Commit Graph

1732 Commits

Author SHA1 Message Date
christos
cc8bab3745 - Replace REG_ENOSYS (unused) with REG_ILLSEQ.
- Add REG_GNU
2021-02-23 17:14:42 +00:00
kre
5cea56c875 Correct typo in previous. 2020-12-04 23:04:58 +00:00
christos
fe1e39fb82 Add __null_sentinel 2020-12-04 20:39:10 +00:00
is
84206f8865 Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).
2020-11-18 12:49:52 +00:00
christos
3c56a67128 - remove bitypes.h fossil
- define u_{char,short,int,long} if we don't have _NETBSD_SOURCE defined
  so that this compiles (and resolv.h since it includes this). This is
  the simplest solution. Others:
  - always define them (bad, pollutes namespace)
  - create <sys/utypes.h> (bad, overkill)
  - change them to unsigned {char, short, int long} (bad, too disruptive)
2020-10-10 19:51:48 +00:00
christos
c53d404f5e add set_rpc_maxgrouplist(3) 2020-10-03 18:30:39 +00:00
nia
796e3f7c10 remove getentropy bits 2020-09-22 21:37:47 +00:00
kamil
2ec95d7ade Remove duplicate word in a comment 2020-09-22 01:52:16 +00:00
kamil
f3656ffa1a Upgrade the SVR4 RTLD r_debug protocol to version 1
Changes:
 - Add a new field r_ldbase in the r_debug struct.
 - Set r_version to 1.

This harmonizes the support with OpenBSD and Linux.
FreeBSD uses version 0 (or no version).
Solaris uses version 2 that is not implemented elsewhere and relies on
SVR4 specific design and interfaces.

Update the code comments as r_debug and link_map is used by other software
than GDB, namely: sanitizers, rump, LLDB.
2020-09-21 16:08:57 +00:00
kamil
acc2f1f4bd Refine the documentation of r_debug
Obtained from OpenBSD link.h r.1.15.
2020-09-21 02:20:27 +00:00
mrg
032acb9ed8 make the 2nd argument to __memmove_chk() const 2020-09-05 13:37:59 +00:00
gutteridge
68466549b9 nameser_compat.h: correct preprocessor error syntax 2020-06-28 02:16:19 +00:00
nia
dfa7a1ca44 Remove bogus tests for 64-bit i386 and SuperH 2020-06-04 11:21:16 +00:00
joerg
5262cf8ca3 Avoid depending on namespace pollution in stdlib.h. 2020-05-26 21:49:29 +00:00
christos
9aa2a9c323 Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
joerg
f11532c6b3 Remove trailing whitespace 2020-05-13 14:00:58 +00:00
nia
5e1fba1a1e Add getentropy() to libc - a simple wrapper to access the kernel CSPRNG.
Posted to tech-userlevel@ a week ago and reviewed by riastradh@.

GETENTROPY(3)		   Library Functions Manual		 GETENTROPY(3)

NAME
     getentropy - fill a buffer with high quality random data

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <unistd.h>

     int
     getentropy(void *buf, size_t buflen);

DESCRIPTION
     The getentropy() function fills a buffer with high quality random data,
     suitable for seeding cryptographically secure psuedorandom number
     generators.

     getentropy() is only intended for seeding random number generators and is
     not intended for use by regular code which simply needs secure random
     data.  For this purpose, please use arc4random(3).

     The maximum value for buflen is 256 bytes.

IMPLEMENTATION NOTES
     getentropy() reads from the sysctl(7) variable kern.arandom.

RETURN VALUES
     The getentropy() function returns 0 on success, and -1 if an error
     occurred.

ERRORS
     getentropy() will succeed unless:

     [EFAULT]		The buf argument points to an invalid memory address.

     [EIO]		Too many bytes were requested.

SEE ALSO
     arc4random(3), rnd(4)

STANDARDS
     The getentropy() function is non-standard.

HISTORY
     The getentropy() function first appeared in OpenBSD 5.6, then in
     FreeBSD 12.0, and NetBSD 10.
2020-05-06 16:17:36 +00:00
kamil
3e0acd5a41 Remove the static_assert() fallback for pre-C11 and pre-C++11
C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.
2020-04-17 15:22:34 +00:00
joerg
6ce4f404a1 Fix depenency on common symbols in sbin. 2020-04-05 15:25:39 +00:00
msaitoh
fa85244576 s/impliment/implement/ in comment. 2020-04-02 15:30:25 +00:00
kamil
1c8bb7d153 Add getsid(2) to the XOPEN namespace (again) 2020-03-31 16:50:31 +00:00
kamil
221d32f6a2 Expose getsid(2) to POSIX >= 2008 2020-03-31 16:49:06 +00:00
joerg
af730bf1c8 Fix visibility of various C99 features, esp. for C++11. 2020-03-20 01:08:42 +00:00
kamil
11ca7e9ab1 Revert previous
Requested by joerg who wants to fix (ab)users.
2020-03-01 22:08:17 +00:00
kamil
eee5e3f86c Fix typo in a comment 2020-03-01 15:18:34 +00:00
kamil
79ecd7cd2c Expose max_align_t to C99/C++
max_align_t does not depend on any pre-C99 or !C++ language feature.

This structure is in use in 3rd party essential C++ code as an extension
for older language revisions and in gnu99 code in the NetBSD distribution
(RTLD's build rules define -std=gnu11 just for exposing this struct).

Exposing max_align_t from the central NetBSD header avoid duplicate
definition in 3rd party code that could differ and produce ABI mismatched
binaries between -std= revisions.

This problem does not exist on OSs like Linux as they get this namespace
visibility defined inside LLVM or GNU toolchain headers. NetBSD ships with
its own stddef.h, rather than relying on a toolchain and its internal
extensions.
2020-03-01 15:08:16 +00:00
joerg
46533116bd Correct C99 / C++11 feature testing. Document remaining missing symbols. 2020-02-22 22:47:35 +00:00
mrg
cefdfaf445 move P_tmpdir from "/var/tmp/" to "/tmp/".
the main effect of this is to make GCC and other libiberty using
tools use /tmp instead of /var/tmp for compiler temp files,
which can be a bottleneck on larger systems.

a survey of other platforms shows only OSX also uses /var/tmp,
everyone else has switched to /tmp long ago.


cons:  some smaller systems may have a smaller /tmp than /var/tmp,
and this may cause builds to fail with out of space earlier.
point the build to /var/tmp using TMPDIR in this case.

one can argue that setting TMPDIR would work around this, but we
want to have the effect for all users without having special setup.
2019-12-13 20:25:16 +00:00
kre
956ce054c6 PR lib/54744 (bruno@haible.de)
Add missing __END_DECLS for C++ compiles.

XXX pullup -9 XXX pullup -8 (bug not present in -7).
2019-12-08 02:15:02 +00:00
kamil
77a1ad5f00 Switch the iconv(3) prototype to the POSIX conformant variation
Remove const from the 2nd argument.

const char ** and char ** are incompatible types and it was a cost to keep
the technically incompatible form for a more purist variation. NetBSD was
almost the last alive OS to still keep the const argument (known leftovers:
Minix and Illumos).

Keep the const form for the internal purposes inside citrus and rump.

Address the build breakage fallout in the same change.

There are no ABI changes.

Change accepted by core@.
2019-10-24 18:17:14 +00:00
christos
06dda90b75 remove comment for incomplete x/open impl (kamil) 2019-09-15 23:52:59 +00:00
christos
e33ef9b983 one fexecve declaration should be enough. 2019-09-15 23:41:41 +00:00
christos
9dd780b230 Remove the _INCOMPLETE_XOPEN_C063 stuff. 2019-09-15 23:41:00 +00:00
christos
cedcb5f35f Declare fexecve 2019-09-15 22:32:48 +00:00
christos
44e58967a6 Sync with 2019b (field name change) 2019-07-03 15:49:21 +00:00
hannken
6f60c4f99e Move the basic part of XDR to common/include/rpc and common/lib/libc/rpc.
No functional change intended.
2019-06-04 15:07:55 +00:00
hannken
25da6a6235 Implement xdrmem_control(), used as xdr_control(xdr, XDR_GET_BYTES_AVAIL ...
and bump libc minor number.

Final goal is to remove the unmaintained XDR implementation
at external/cddl/osnet/dist/uts/common/rpc.
2019-06-04 08:44:08 +00:00
christos
2f3bda949c Add GLOB_TILDE_CHECK (from GNU) 2019-05-29 01:21:33 +00:00
kamil
002b04a5d5 As a _NETBSD_SOURCE extension define static_assert for pre-c11/c++99
Proposed on source-changes-d.
2019-05-27 07:31:11 +00:00
maya
4f1d88618a Limit static_assert visibility to C11.
The existing definition caused issues as GCC only provides _Static_assert
when building C11 code.
This follows the C standard: static_assert available since C11.

Fixes https://rt.perl.org/Public/Bug/Display.html?id=134023
2019-05-22 21:25:01 +00:00
roy
81b96f23a9 Don't install YP headers when MKYP=no 2019-04-24 10:26:08 +00:00
christos
a138d72b53 merge tzcode 2019a 2019-04-04 18:18:52 +00:00
christos
ec26bb08ec remove global pointers, add get/seters. 2019-03-12 15:11:13 +00:00
christos
9610e03031 catch up with name change. 2019-03-10 15:31:02 +00:00
christos
8f28406217 add missing externs. 2019-03-10 03:54:08 +00:00
christos
771773212c add copyright. 2019-03-09 06:12:55 +00:00
christos
d444c9125e PR/54050: Ryo ONODERA: Add the jemalloc-specific api prototypes and extern. 2019-03-09 03:52:10 +00:00
joerg
4cbe3e3436 Provide global variables with C linkage, otherwise they will create
conflicts for C++ modules use.
2019-01-08 17:35:42 +00:00
maya
b3991c8820 We can make a stronger guarantee than __pure.
abs/labs don't read global memory.

Make GCC 9 happier.
2019-01-05 09:16:46 +00:00
maya
1530e68601 Limit wcslcat, wcslcpy visibility to _NETBSD_SOURCE
wcswidth, wcwidth to POSIX.1-2001 or _NETBSD_SOURCE

Updated patch from kretschm in PR standards/39422
2018-12-28 13:11:46 +00:00