|
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0 |
|
| #
faed5989 |
| 11-Jun-2022 |
Sascha Wildner <saw@online.de> |
<stdlib.h>: Don't expose malloc_usable_size() in POSIX environments.
|
| #
8f546928 |
| 11-Jun-2022 |
Matthew Dillon <dillon@apollo.backplane.com> |
world - include malloc_np.h from stdlib.h
* Include malloc_np.h from stdlib.h as per FreeBSD manual page. Note that linux includes it from <malloc.h>, but BSD's do not have a malloc.h so this is
world - include malloc_np.h from stdlib.h
* Include malloc_np.h from stdlib.h as per FreeBSD manual page. Note that linux includes it from <malloc.h>, but BSD's do not have a malloc.h so this is the easier path for now.
show more ...
|
|
Revision tags: v6.2.2, v6.2.1, v6.3.0 |
|
| #
7307c476 |
| 23-Dec-2021 |
Sascha Wildner <saw@online.de> |
libc: Add a clearenv() function.
Seems useful for dports, as pointed out by zrj.
Taken-from: FreeBSD
|
|
Revision tags: v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0 |
|
| #
c78f0d6a |
| 28-Feb-2021 |
Sascha Wildner <saw@online.de> |
Remove last bits of Intel compiler support. We never had or cared about it.
FreeBSD removed theirs too, a while ago. Our remains were just inherited.
|
|
Revision tags: v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
| #
1e3ed379 |
| 29-Nov-2019 |
Sascha Wildner <saw@online.de> |
<stdlib.h>: Check if __cplusplus is defined before checking its value.
|
| #
3cfdabcf |
| 02-Nov-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
<wchar.h>: Refactor wchar_t/wint_t/mb_state setup.
Kernel has no wchar support functions (except for VKERNEL64).
* Extract wide-character types setup to common <machine/wchar.h>. * Avoid using _
<wchar.h>: Refactor wchar_t/wint_t/mb_state setup.
Kernel has no wchar support functions (except for VKERNEL64).
* Extract wide-character types setup to common <machine/wchar.h>. * Avoid using __wchar_t for clang -fms-extensions issue. * Add more handling for c++ and -fshort-wchar (not supported in libc).
This essentially removes these types from kernel namespace and paves the way for further both userland/kernelland visibility cleanup by making <sys/stdint.h> clean. The WCHAR_MAX/WCHAR_MIN limits will be addressed in separate commit.
show more ...
|
| #
860d3f5b |
| 06-Oct-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
Nuke legacy non standard rune_t type.
Not used anywhere and comments indicate it is meant not to be used outside lib/libc/locale anyway.
|
| #
258eae18 |
| 14-Sep-2019 |
Sascha Wildner <saw@online.de> |
<stdlib.h>: Fix typedef guard.
|
| #
086b156c |
| 09-Sep-2019 |
Sascha Wildner <saw@online.de> |
libc: Add gets_s(3) from ISO/IEC TR 24731-1.
For more information see the Technical Report (drafts of it are on the web) or e.g. http://en.cppreference.com/w/c/io/gets.
This also adds set_constrain
libc: Add gets_s(3) from ISO/IEC TR 24731-1.
For more information see the Technical Report (drafts of it are on the web) or e.g. http://en.cppreference.com/w/c/io/gets.
This also adds set_constraint_handler_s(), abort_handler_s(), ignore_handler_s(), the RSIZE_MAX define, and the types rsize_t, errno_t and constraint_handler_t.
Visibility is restricted to our default environment by default, but can be enabled by defining __STDC_WANT_LIB_EXT1__ to 1, per the TR.
While here, put gets()'s documentation into a manual page of its own with a note that it is depracated. We'll likely remove it from libc too at a later point in time.
Requested-by: zrj Taken-from: FreeBSD (with some adjustments)
show more ...
|
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0 |
|
| #
b6e3710e |
| 02-Jun-2019 |
Sascha Wildner <saw@online.de> |
Remove lint checks in system headers.
Modern checkers do not (need to) pass this anymore to the build.
|
|
Revision tags: v5.4.3, v5.4.2 |
|
| #
64c3fdb4 |
| 09-Apr-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
libc/stdlib: Add recallocarray() function.
It is useful function for security related features, like resizing memory objects containing sensitive data to avoid information leaking. Update manpage.
libc/stdlib: Add recallocarray() function.
It is useful function for security related features, like resizing memory objects containing sensitive data to avoid information leaking. Update manpage.
Taken-from: OpenBSD
show more ...
|
| #
78297c9b |
| 09-Apr-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
libc/stdlib: Add freezero() function.
It is useful function for security related features. Internally uses explicit_bzero(3) before freeing the pointers. It could be implemented in nmalloc.c for ext
libc/stdlib: Add freezero() function.
It is useful function for security related features. Internally uses explicit_bzero(3) before freeing the pointers. It could be implemented in nmalloc.c for extra benefits. Update the manpage.
Taken-from: OpenBSD
show more ...
|
| #
66932323 |
| 12-Jan-2019 |
Sascha Wildner <saw@online.de> |
libc: Add reallocarray() from OpenBSD.
It is useful for dhcpcd, mandoc and libssh. Also some dports might pick it up. A few other dports have workarounds which, once reallocarray() is in release too
libc: Add reallocarray() from OpenBSD.
It is useful for dhcpcd, mandoc and libssh. Also some dports might pick it up. A few other dports have workarounds which, once reallocarray() is in release too, can be removed.
Taken-from: OpenBSD (manual page from FreeBSD) Pointed-out-by: aly
show more ...
|
|
Revision tags: v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1 |
|
| #
f85b95dd |
| 20-Sep-2018 |
Sascha Wildner <saw@online.de> |
In several standard headers, harmonize checks for legacy defines etc.
When something goes away in a certain issue of the standard, always check with < $standard, not <= $previous_standard. Also, uni
In several standard headers, harmonize checks for legacy defines etc.
When something goes away in a certain issue of the standard, always check with < $standard, not <= $previous_standard. Also, uniformly check for __XSI_VISIBLE or __POSIX_VISIBLE being > 0 in these cases.
While here, fix a small nit in <sys/wait.h>: wait3() was removed from Issue 6, but the requirement to define the rusage structure was removed from Issue 7.
show more ...
|
|
Revision tags: v5.2.2, v5.2.1 |
|
| #
e6975a4e |
| 05-May-2018 |
Sascha Wildner <saw@online.de> |
libc: Add strsuftoll{,x}()
In preparation for makefs(8).
Various dports (such as ftp/tnftpd) will also pick it up.
Taken-from: NetBSD Dports-testing: zrj
|
|
Revision tags: v5.2.0, v5.3.0, v5.2.0rc |
|
| #
fc0e4e26 |
| 26-Jan-2018 |
Sascha Wildner <saw@online.de> |
<sys/cdefs.h>: Add __alloc_size2() for functions taking number and size.
Add it to calloc().
Pointed-out-by: zrj
|
|
Revision tags: v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1 |
|
| #
3d258b72 |
| 22-Sep-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
Use recently added attributes in few standard headers.
There attributes are to assits compiler making better analysis doring compilation time. Like branch prediction and hinting.
While there, for n
Use recently added attributes in few standard headers.
There attributes are to assits compiler making better analysis doring compilation time. Like branch prediction and hinting.
While there, for now prefer to use __attribute__((__noreturn__)) to _Noreturn, since neither OpenBSD or NetBSD has it at all and in our variant we don't handle it in c++ case ([[noreturn]]) anyway. Looks to be only a workaround for some old clang++ version.
show more ...
|
| #
d6fa034f |
| 22-Sep-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
<stdlib.h>: Change visibility of few POSIX extensions to ISO C.
Seems it should be like this.
|
| #
d8de7723 |
| 22-Sep-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
style(9): Perform some cleanup in few standard headers.
For upcomming changes. No functional change.
Kindly-requested-by: swildner@
|
| #
2d418273 |
| 20-Aug-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
Prevent dports gcc "fixing" the last headers.
Just mention _GCC_(PTRDIFF|SIZE|WCHAR)_T in comments to force 'gnu_types' test to skip and not fix these headers. DragonFly types should be fine.
|
| #
b345f56c |
| 20-Aug-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
<stdlib.h>: Fix MB_CUR_MAX return type.
Looks like per POSIX it should be size_t (currently it was int). While there, expand visibility for long long types (including _Exit()) for certain c++ implem
<stdlib.h>: Fix MB_CUR_MAX return type.
Looks like per POSIX it should be size_t (currently it was int). While there, expand visibility for long long types (including _Exit()) for certain c++ implementations.
show more ...
|
|
Revision tags: v4.6.0 |
|
| #
5270936c |
| 27-Jul-2016 |
Matthew Dillon <dillon@apollo.backplane.com> |
libc - Fix numerous fork/exec*() leaks, also add mkostemp() and mkostemps().
* Use O_CLOEXEC in many places to prevent temporary descriptors from leaking into fork/exec'd code (e.g. in multi-threa
libc - Fix numerous fork/exec*() leaks, also add mkostemp() and mkostemps().
* Use O_CLOEXEC in many places to prevent temporary descriptors from leaking into fork/exec'd code (e.g. in multi-threaded situations).
* Note that the popen code will close any other popen()'d descriptors in the child process that it forks just prior to exec. However, there was a descriptor leak where another thread issuing popen() at the same time could leak the descriptors into their exec.
Use O_CLOEXEC to close this hole.
* popen() now accepts the 'e' flag (i.e. "re") to retain O_CLOEXEC in the returned descriptor. Normal "r" (etc) will clear O_CLOEXEC in the returned descriptor.
Note that normal "r" modes are still fine for most use cases since popen properly closes other popen()d descriptors in the fork(). BUT!! If the threaded program calls exec*() in other ways, such descriptors may unintentionally be passed onto sub-processes. So consider using "re".
* Add mkostemp() and mkostemps() to allow O_CLOEXEC to be passed in, closing a thread race that would otherwise leak the temporary descriptor into other fork/exec()s.
Taken-from: Mostly taken from FreeBSD
show more ...
|
|
Revision tags: v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2 |
|
| #
bc7a8293 |
| 25-Jan-2016 |
zrj <rimvydas.jasinskas@gmail.com> |
Remove advertising header from include/
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
|
|
Revision tags: v4.4.1, v4.4.0, v4.5.0, v4.4.0rc |
|
| #
3b63b459 |
| 27-Oct-2015 |
Sascha Wildner <saw@online.de> |
<stdlib.h>/<unistd.h>: Expose mkdtemp()'s prototype also if XSI is visible.
The history of this function in the specs seems to be a bit convoluted for this function, to say the least. Even though I
<stdlib.h>/<unistd.h>: Expose mkdtemp()'s prototype also if XSI is visible.
The history of this function in the specs seems to be a bit convoluted for this function, to say the least. Even though I can't find it in either Issue 5 or 6, go with what Issue 7's HISTORY says and treat it like it was moved from XSI to base starting with Issue 7:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdtemp.html
Most importantly, this commit fixes x11/xterm which was building but segfaulting after 8eb95a5667325.
Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
show more ...
|
| #
8eb95a56 |
| 21-Oct-2015 |
Sascha Wildner <saw@online.de> |
Fix visibility of various functions in a number of headers.
The following functions were moved from XSI into the base with POSIX 200809:
catclose(), catgets(), catopen(), dlclose(), dlerror(), dlop
Fix visibility of various functions in a number of headers.
The following functions were moved from XSI into the base with POSIX 200809:
catclose(), catgets(), catopen(), dlclose(), dlerror(), dlopen(), dlsym(), fchdir(), getpgid(), getsid(), getsubopt(), iconv(), iconv_close(), iconv_open(), lchown(), mkstemp(), nl_langinfo(), poll(), pread(), pwrite(), strdup(), strfmon(), tcgetsid(), truncate(), and waitid().
This commit adjusts our headers to reflect that, i.e. specifying _POSIX_C_SOURCE=200809 is now enough to expose their prototypes.
The checking of __XSI_VISIBLE's value (ranges) for XSI functions could certainly be better (generally in our headers).
Also, we don't yet have waitid().
This change was build tested with around 8000 ports (until the bulk build choked on a jdk7 memory leak (I suppose) while building textproc/fop). The glibc conformance test suite thinks this commit is correct, too.
show more ...
|