• Home
  • History
  • Annotate
  • only in /bionic/libc/upstream-freebsd/
History log of /bionic/libc/upstream-freebsd/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
baed51ee3a13dae4b87b11870bdf7f10bdc9efc1 16-Nov-2017 Elliott Hughes <enh@google.com> Change ARG_MAX/_SC_ARG_MAX back to a constant.

As per the lkml thread https://lkml.org/lkml/2017/11/1/946.

Bug: http://b/65818597
Test: ran tests
Change-Id: I7a0610e6903e6761f2b31416e2f5017bd7a60659
ndroid/include/freebsd-compat.h
f1c568d1eac6d2baba62af35e5b9856fb7e98319 27-Sep-2017 Elliott Hughes <enh@google.com> Add <glob.h>.

This is the FreeBSD implementation, plus some tests. The FreeBSD
implementation includes the GNU extensions and seems to be what
iOS is using too, which should provide bug compatibility for app
developers.

The code unfortunately uses a lot of stack, and uses FreeBSD locale
implementation that we don't have, but it does seem better maintained
than the other BSDs.

Bug: http://b/29251134
Test: ran tests
Change-Id: Ie477b45e42a6df1319b25712098519d2b33adf67
ndroid/include/collate.h
ndroid/include/freebsd-compat.h
ib/libc/gen/glob.c
5702c6ff454a8a9695fae64597d7692b06fc27b5 01-Sep-2017 Elliott Hughes <enh@google.com> Finish <search.h>.

I'm unable to find a bug, but we've had requests for this internally
once or twice (though I pointed those folks at the STL), and there's
code we build for the host or in our bootloaders that would use this,
and there's reasonable-looking FreeBSD implementation ready and waiting.

Bug: N/A
Test: ran tests
Change-Id: I6ddee4b71bea4c22ed015debd31d3eaac4fcdd35
ib/libc/stdlib/hcreate.c
ib/libc/stdlib/hcreate_r.c
ib/libc/stdlib/hdestroy_r.c
ib/libc/stdlib/hsearch.h
ib/libc/stdlib/hsearch_r.c
54f5d8331f28ff4484b6df8ca493b39c34b91af2 01-Aug-2017 George Burgess IV <gbiv@google.com> libc fortify: make socket.h and stdlib.h use diagnose_if

Since realpath no longer needs to be overloaded, we can restore the
upstream source to purity. We'll be able to do this with most of the
other functions when we pull a newer clang in.

Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I484221bba0b291273fece23d2be2f5f9fd713d2c
ib/libc/stdlib/realpath.c
20f3399956b691d79b3979d586d76d8180113f07 13-Jul-2017 Elliott Hughes <enh@google.com> Switch to FreeBSD for wcsstr and wmemcpy.

Almost all of our w* functions come from FreeBSD already. The one downside is
that we can't take all our w* functions from FreeBSD because FreeBSD handles
locales very differently from us.

Bug: N/A
Test: ran tests
Change-Id: I177b4332499992babd5d5afe5b3f469f8c4345a5
ib/libc/string/wcsstr.c
ib/libc/string/wmemcpy.c
4b1a3992de7803d4c082867ea1168efeaa85cc5d 19-May-2017 Xin Li <delphij@google.com> libc: Sync qsort(3) with FreeBSD revision r318515.

r279663: enhance to handle 32-bit aligned data on 64-bit systems

r279666: qsort(3): small style(9) cleanups.

r288030: Use ANSI C prototypes. Eliminates -Wold-style-definition
warnings.

r318514: Use size_t.

r318515: Reduce the possible recursion level to log2(N) by always
recursing on the smaller partition instead.

Bug: 38450217
Test: builds, ./tests/run-on-host.sh 64
Change-Id: Ieb622e6f54f8f6d6f62e1bdb491d3b5c8e2f9965
ib/libc/stdlib/qsort.c
7cc779f15c524e1622f7d5b1c7e82e6ffc6677fd 09-Feb-2017 George Burgess IV <gbiv@google.com> libc: add clang FORTIFY support

This patch adds clang-style FORTIFY to Bionic. For more information on
FORTIFY, please see https://goo.gl/8HS2dW . This implementation works
for versions of clang that don't support diagnose_if, so please see the
"without diagnose_if" sections. We plan to swap to a diagnose_if-based
FORTIFY later this year (since it doesn't really add any features; it
just simplifies the implementation a lot, and it gives us much prettier
diagnostics)

Bug: 32073964
Test: Builds on angler, bullhead, marlin, sailfish. Bionic CTS tests
pass on Angler and Bullhead.

Change-Id: I607aecbeee81529709b1eee7bef5b0836151eb2b
ib/libc/stdlib/realpath.c
da7a0b105ddc59cd731812b6e3fcd71821cbb01e 07-Jan-2017 Elliott Hughes <enh@google.com> Move to .md files for even trivial documentation.

So it's automatically displayed for folks browsing the source.

Bug: N/A
Test: N/A
Change-Id: I80e823415f1fb12ad8ce5348e926519b6e29580f
EADME.md
EADME.txt
3d125175d75334999ab33f6409eb969a63e42522 02-May-2016 Elliott Hughes <enh@google.com> Move <machine/endian.h> somewhere more private.

Bug: http://b/28519060
Change-Id: I1c7811f95f46c65d4152bcf509b6e048c45bc28b
ndroid/include/machine/endian.h
26a83229728c099f5572edb65dedce7163dbff71 15-Sep-2015 Elliott Hughes <enh@google.com> Move several FreeBSD functions to OpenBSD.

There's no difference between the two BSDs for these functions, so let's go
with the majority.

Change-Id: Ic296f23153a48bed5ad152f5b31989c4e00e60bd
ndroid/include/spinlock.h
ib/libc/stdlib/abs.c
ib/libc/stdlib/imaxabs.c
ib/libc/stdlib/imaxdiv.c
ib/libc/stdlib/labs.c
ib/libc/stdlib/llabs.c
76f8916b904db14facf811ae44e1265261349702 26-Jan-2015 Elliott Hughes <enh@google.com> Clean up <stdlib.h> slightly.

Interestingly, this mostly involves cleaning up our implementation of
various <string.h> functions.

Change-Id: Ifaef49b5cb997134f7bc0cc31bdac844bdb9e089
ib/libc/string/wmemcpy.c
39cd0fa24a5a9fd6955f40e52a94cf41eb782eb4 29-Oct-2014 Elliott Hughes <enh@google.com> Remove an unused file.

We don't have any FreeBSD stdio left.

Bug: 17154680
Change-Id: I145627f564364ac8d4707d431d451cc3115c1c6a
ndroid/include/libc_private.h
31e072fc9bcf6517d763c7af6d872efd1784629e 01-Oct-2014 Elliott Hughes <enh@google.com> Update our FreeBSD realpath(3) to upstream head.

Change-Id: I8c89728184ecd2c1a28a05cefa84a5037d28b552
ib/libc/stdlib/realpath.c
567d3fcb7ece287a84912183e91eff851fa48fc2 24-Sep-2014 Elliott Hughes <enh@google.com> Merge "Switch to OpenBSD fopen/fclose."
af12924f673a8c374132a318c88f573116f221cb 24-Sep-2014 Elliott Hughes <enh@google.com> Sync with current upstream getopt_long.c.

Change-Id: I269195aa581a688fd3eb99552d506b8f5f6a8395
ib/libc/stdlib/getopt_long.c
5a69da8d7af6a388a4ad5b3dd619017b0030031a 24-Sep-2014 Elliott Hughes <enh@google.com> Switch to OpenBSD fopen/fclose.

This means all our stdio implementation is now the OpenBSD implementation.
The only thing we lose is the STDIO_THREAD_LOCK calls but they were no-ops
anyway.

We should probably talk to upstream about this. Either fix the locking or,
preferably, encourage them to move away from this pooling (especially since
there's no eviction policy).

Bug: 17154680
Change-Id: Ie2523e444a7d0965b8d141d57e3e11f6432d5b9a
ndroid/include/freebsd-compat.h
ib/libc/stdio/fclose.c
ib/libc/stdio/fopen.c
a71b4c3f144a516826e8ac5b262099b920c49ce0 24-Sep-2014 Elliott Hughes <enh@google.com> Switch to OpenBSD flags.c.

Change-Id: I0a35e5bd9f8edba27e0c73e5c8150636346d6a81
ib/libc/stdio/flags.c
b81046202842427a7e894a6bcb357971332997b0 19-Aug-2014 Elliott Hughes <enh@google.com> Fix _BSD_SOURCE/__USE_BSD.

Bug: 14659579
Change-Id: I80ec9584f054c02d1078828f6bca759c42bc1d4c
ndroid/include/freebsd-compat.h
a167eef5482d4a89d4277ec74f57adbe38052813 14-Jul-2014 Elliott Hughes <enh@google.com> Fix visibility for a bunch more symbols.

Bug: 11156955
Bug: 15291317
Change-Id: I664f25cce7c17085a101d6593d8e01525a1f6a90
ndroid/include/namespace.h
65935979311373f2c7fa27cbfc189f49b188ca3a 02-Jul-2014 Elliott Hughes <enh@google.com> Switch to upstream OpenBSD mktemp.c.

Almost all of our stdio is actually OpenBSD, so although this isn't
really a core part of stdio (it doesn't touch struct FILE, for example)
it probably makes sense for it to come from the same upstream. My
actual motivation though is that it's the only FreeBSD file we have
compiler warnings from.

This patch moves us over to -Werror by default, with only the DNS code
having -Wno-error.

Change-Id: Id244a5b445cba41b0a1ca30298ca7b1ed177810c
ib/libc/stdio/mktemp.c
623b0d05bd924e7fa3c155492695123c87c3a2b1 15-May-2014 Dmitriy Ivanov <dimitry@google.com> Register _cleanup function with atexit

* Register cleanup function with atexit
instead of calling it explicitly on
exit()
* abort() no longer calls _cleanup:
Flushing stdio buffers on abort is no
longer required by POSIX.
* dlmalloc no longer need to reset cleanup
(see above)
* Upstream findfp.c makebuf.c setvbuf.cexit.c
to openbsd versions.

Bug: 14415367
Change-Id: I277058852485a9d3dbb13e5c232db5f9948d78ac
ib/libc/stdio/makebuf.c
ib/libc/stdio/setvbuf.c
8ec21d9ded4c05744b3f9388bf824a508d7c95c2 05-May-2014 Elliott Hughes <enh@google.com> Merge "Switch to current upstream OpenBSD wsetup.c."
53b24382f5299931af5d08c933a765334a092c56 03-May-2014 Elliott Hughes <enh@google.com> Switch to current upstream OpenBSD wsetup.c.

Change-Id: I2c1123f3e1d3c4af7fd7bf354e763934a39b78c0
ib/libc/stdio/wsetup.c
792ae72e41923800ba8797d87a76346cb2de14b9 03-May-2014 Elliott Hughes <enh@google.com> Switch to current upstream OpenBSD fwrite.c.

Change-Id: Ife527aafc1e5438f477d711902efe6e6f59f3f8e
ib/libc/stdio/fwrite.c
b8425c549a0bfe08b01b5906b95603d8523c1b16 30-Apr-2014 Dan Albert <danalbert@google.com> Adds quick_exit(3) and at_quick_exit(3) from freebsd

Change-Id: I4fe88abd8f7b8aa45e58aeb2529d59a8d555d338
ib/libc/stdlib/quick_exit.c
d299bcfdad959a3a0adf1683605b15a1c3b3ab66 29-Apr-2014 Elliott Hughes <enh@google.com> Replace our broken wcswcs with the working upstream one.

Change-Id: I2952684df5674d10f0564d92c2cd42597725c0e3
ib/libc/string/wcsstr.c
d39f3f2c2e7fc73ddb019695f0df3417deef5bf4 22-Apr-2014 Elliott Hughes <enh@google.com> Clean up and document our hacks for building BSD source.

Change-Id: Ic591e22fa5b363bb68376b9f25814c0e5bd83fbf
ndroid/include/freebsd-compat.h
ndroid/include/libc_private.h
ndroid/include/namespace.h
ndroid/include/spinlock.h
ndroid/include/un-namespace.h
reebsd-compat.h
ibc_private.h
amespace.h
pinlock.h
n-namespace.h
f2cea021ab2c6d7d7feeb40cca098aa132605876 13-Mar-2014 Elliott Hughes <enh@google.com> Clean up <stdio.h> macros.

Also neuter __isthreaded.

We should come back to try to hide struct FILE's internals for LP64.

Bug: 3453512
Bug: 3453550
Change-Id: I7e115329fb4579246a72fea367b9fc8cb6055d18
ib/libc/stdio/putw.c
ibc_private.h
57a883640f3b43bf5e332d64489b3eab67a5ac3f 11-Mar-2014 Elliott Hughes <enh@google.com> Switch to upstream FreeBSD ldexp.c.

(Yes, this should be in libm, but it isn't. For once, this mistake predates
bionic!)

Change-Id: I1340407acbcdc0151dee969a38ba490bdd5e6767
ib/libc/gen/ldexp.c
53e43292aac91bf62995788cd5ca2ceb7caea283 25-Feb-2014 Elliott Hughes <enh@google.com> More OpenBSD cleanup (primarily string).

This patch removes the string/ and wchar/ directories.

Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
ib/libc/string/wcslcpy.c
0133944b09d1c0a35041f7a41eb6bfb660144f4f 21-Feb-2014 Elliott Hughes <enh@google.com> Clean up our OpenBSD usage.

Also undo some of the mess where we have OpenBSD <stdio.h> but a mix of
different BSD's implementations.

In this first pass, I've only moved easy OpenBSD stuff.

Change-Id: Iae67b02cde6dba9d8d06fedeb53efbfdac0a8cf6
ib/libc/stdio/clrerr.c
ib/libc/stdio/fdopen.c
ib/libc/stdio/feof.c
ib/libc/stdio/ferror.c
ib/libc/stdio/fgetln.c
ib/libc/stdio/fgetpos.c
ib/libc/stdio/fgets.c
ib/libc/stdio/fileno.c
ib/libc/stdio/fpurge.c
ib/libc/stdio/fputs.c
ib/libc/stdio/fsetpos.c
ib/libc/stdio/funopen.c
ib/libc/stdio/fwalk.c
ib/libc/stdio/getc.c
ib/libc/stdio/getchar.c
ib/libc/stdio/putc.c
ib/libc/stdio/putchar.c
ib/libc/stdio/puts.c
ib/libc/stdio/remove.c
ib/libc/stdio/rget.c
ib/libc/stdio/setbuf.c
ib/libc/stdio/setbuffer.c
ib/libc/stdio/tempnam.c
ib/libc/stdio/tmpnam.c
a38cb088619d3e2f2194247038c10897d1c5036e 17-Feb-2014 Elliott Hughes <enh@google.com> Clean up various warnings in bionic.

Change-Id: Ic57541d0a567fd4ae79f0ad59b2ffde1130eb7d2
reebsd-compat.h
ab61eb366ac48addf2bca6093a34455193f5c8df 21-Nov-2013 Elliott Hughes <enh@google.com> Switch to upstream sleep(3) and usleep(3).

Also fix the signature of usleep, and the definition of useconds_t which
should be unsigned, as the 'u' in its name implies.

This patch also cleans up the existing FreeBSD hacks by moving the libm
stuff from <sys/cdefs.h> to a libm-private header, and adding comments
about the hacks we use to build FreeBSD source.

Change-Id: Ibe5067a380502df94a0a3a7901969b35411085b6
reebsd-compat.h
ib/libc/gen/sleep.c
ib/libc/gen/usleep.c
aec2ffbc5a7b45368ceab3663265fbb659968fe7 12-Aug-2013 Elliott Hughes <enh@google.com> Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.

Change-Id: I94c411c22634e43184445c82e7388e51fc46a8cc
ib/libc/stdlib/abs.c
ib/libc/stdlib/imaxabs.c
ib/libc/stdlib/imaxdiv.c
ib/libc/stdlib/labs.c
ib/libc/stdlib/llabs.c
284f7880323d33356df682c3cfb6b7f0c665bfd4 20-Jul-2013 Elliott Hughes <enh@google.com> Upgrade mktemp.c to the current upstream version.

Yet another archaic relic containing bugs that had been fixed years before the
Android project even started...

Bug: 9935113
Change-Id: I3c9d019a216efd609ee568cf8c70bc360f357403
ib/libc/stdio/mktemp.c
amespace.h
d278b828fef47fb2d7098f8ec70867fbd3da09d6 25-Jun-2013 Elliott Hughes <enh@google.com> Switch to current upstream getopt_long.

Change-Id: I4c646dcb8be9e88dd54d069a03bbc5fbfd92de03
reebsd-compat.h
ib/libc/stdlib/getopt_long.c
4eeec44e29c4d3471c6574c7eb8fdf240a9f17d7 13-Jun-2013 Elliott Hughes <enh@google.com> Fix the qsort copyright notice (fixed upstream this afternoon).

Change-Id: I786feb42719bceaa7da91565e350c1333b0d301f
ib/libc/stdlib/qsort.c
2815b1dd452a7fb7de6ba0df2cb250987a1b62c4 13-Jun-2013 Elliott Hughes <enh@google.com> Take some fixed upstream copyright headers and regenerate NOTICE.

Change-Id: Ifff41d69c13322dbc6f928ce7d4c65f76fe36772
ib/libc/string/wcscmp.c
ib/libc/string/wcsncmp.c
ib/libc/string/wcsncpy.c
ib/libc/string/wcsstr.c
ib/libc/string/wcstok.c
677ee5647721df22f13909375d5d0e770a1a80bf 13-Jun-2013 Elliott Hughes <enh@google.com> Switch to current upstream stdio makebuf.c and setvbuf.c.

Change-Id: I4761b5e94459815520f01062eef39abf62af621f
reebsd-compat.h
ib/libc/stdio/makebuf.c
ib/libc/stdio/setvbuf.c
b2e1abda0503874a5bb097e0b55ad4f8ce211a8d 14-May-2013 Elliott Hughes <enh@google.com> Pull upstream FreeBSD revision 249810.

Fix license clause numbering.

Convert libc/stdio from K&R to ANSI C.

And add '__restrict' where it appeared in the header prototypes.

Change-Id: I5fdb22f79d3effa2298d03f9aa8412b4b087da04
Upstream: http://svnweb.freebsd.org/base?view=revision&revision=249810
ib/libc/stdio/clrerr.c
ib/libc/stdio/fclose.c
ib/libc/stdio/fdopen.c
ib/libc/stdio/feof.c
ib/libc/stdio/ferror.c
ib/libc/stdio/fgetln.c
ib/libc/stdio/fgetpos.c
ib/libc/stdio/fgets.c
ib/libc/stdio/fileno.c
ib/libc/stdio/flags.c
ib/libc/stdio/fopen.c
ib/libc/stdio/fpurge.c
ib/libc/stdio/fputs.c
ib/libc/stdio/fsetpos.c
ib/libc/stdio/funopen.c
ib/libc/stdio/fwalk.c
ib/libc/stdio/fwrite.c
ib/libc/stdio/getc.c
ib/libc/stdio/getchar.c
ib/libc/stdio/putc.c
ib/libc/stdio/putchar.c
ib/libc/stdio/puts.c
ib/libc/stdio/putw.c
ib/libc/stdio/remove.c
ib/libc/stdio/rget.c
ib/libc/stdio/setbuf.c
ib/libc/stdio/setbuffer.c
ib/libc/stdio/tempnam.c
ib/libc/stdio/tmpnam.c
ib/libc/stdio/wsetup.c
0b25f633a23e575c8a1f9547d1af5dc5b0157a1c 12-Apr-2013 Elliott Hughes <enh@google.com> Switch to current FreeBSD qsort.

Change-Id: Ic46cd0b663dc5fa78c99dd38db0bfe849a25e789
ib/libc/stdlib/qsort.c
6b05c8e28017518fae04a3a601d0d245916561d2 11-Apr-2013 Elliott Hughes <enh@google.com> Start moving to current FreeBSD stdio.

This only touches the easy stuff.

Change-Id: Iecee57f1681dba5c56bff59f0e9a89811a71f0ca
reebsd-compat.h
ib/libc/stdio/clrerr.c
ib/libc/stdio/fclose.c
ib/libc/stdio/fdopen.c
ib/libc/stdio/feof.c
ib/libc/stdio/ferror.c
ib/libc/stdio/fgetln.c
ib/libc/stdio/fgetpos.c
ib/libc/stdio/fgets.c
ib/libc/stdio/fileno.c
ib/libc/stdio/flags.c
ib/libc/stdio/fopen.c
ib/libc/stdio/fpurge.c
ib/libc/stdio/fputs.c
ib/libc/stdio/fsetpos.c
ib/libc/stdio/funopen.c
ib/libc/stdio/fwalk.c
ib/libc/stdio/fwrite.c
ib/libc/stdio/getc.c
ib/libc/stdio/getchar.c
ib/libc/stdio/putc.c
ib/libc/stdio/putchar.c
ib/libc/stdio/puts.c
ib/libc/stdio/putw.c
ib/libc/stdio/remove.c
ib/libc/stdio/rget.c
ib/libc/stdio/setbuf.c
ib/libc/stdio/setbuffer.c
ib/libc/stdio/tempnam.c
ib/libc/stdio/tmpnam.c
ib/libc/stdio/wsetup.c
ibc_private.h
pinlock.h
0493a6f7be42e22d68e1d6ddb8eb2edaf818756f 07-Mar-2013 Elliott Hughes <enh@google.com> Regenerate NOTICE files.

Also clean up some obsolete cruft.

Change-Id: Iec3b36f6607f7a08b72de99294ed5b6cd910dd5f
EADME.txt
eb93ebffba21e2c9b8a12bb86db60d38c7750270 02-Mar-2013 Elliott Hughes <enh@google.com> Switch to upstream-freebsd for the unmolested wchar code.

Change-Id: I87b4d76ff8da04109ae53638eec4f11629798960
ib/libc/string/wcpcpy.c
ib/libc/string/wcpncpy.c
ib/libc/string/wcscasecmp.c
ib/libc/string/wcscat.c
ib/libc/string/wcschr.c
ib/libc/string/wcscmp.c
ib/libc/string/wcscpy.c
ib/libc/string/wcscspn.c
ib/libc/string/wcsdup.c
ib/libc/string/wcslcat.c
ib/libc/string/wcslcpy.c
ib/libc/string/wcslen.c
ib/libc/string/wcsncasecmp.c
ib/libc/string/wcsncat.c
ib/libc/string/wcsncmp.c
ib/libc/string/wcsncpy.c
ib/libc/string/wcsnlen.c
ib/libc/string/wcspbrk.c
ib/libc/string/wcsrchr.c
ib/libc/string/wcsspn.c
ib/libc/string/wcsstr.c
ib/libc/string/wcstok.c
ib/libc/string/wmemchr.c
ib/libc/string/wmemcmp.c
ib/libc/string/wmemcpy.c
ib/libc/string/wmemmove.c
ib/libc/string/wmemset.c
f0777843c03deb26b1f78c8edd17c557041696e9 02-Mar-2013 Elliott Hughes <enh@google.com> Move realpath.c to upstream-freebsd.

This is actually a slightly newer upstream version than the one I
originally pulled. Hopefully now it's in upstream-freebsd it will
be easier to track upstream, though I still need to sit down and
write the necessary scripts at some point.

Bug: 5110679
Change-Id: I87e563f0f95aa8e68b45578e2a8f448bbf827a33
reebsd-compat.h
ib/libc/stdlib/realpath.c
amespace.h
n-namespace.h