Commit Graph

1707 Commits

Author SHA1 Message Date
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
christos
fb69ccbd92 more type protection macro lossage. 2018-11-18 19:22:23 +00:00
martin
a9fb6a0f33 PR standards/53525: move getsubopt() to stdlib.h 2018-08-15 10:21:42 +00:00
christos
f0907ab569 Fix the rest of the functions that have been made visible by xopen5,
posix 2017, and c99.
2018-06-24 23:55:29 +00:00
christos
9dd3d50e00 PR/53393: coypu: move rint to the right section. 2018-06-24 22:07:46 +00:00
kamil
4f2f27c8d8 Mark in string.h: memccpy(3) and strdup(3) as _POSIX_C_SOURCE >= 2001 2018-02-20 02:35:24 +00:00
christos
3c15acfdbe fix typo 2018-02-06 20:22:41 +00:00
christos
4e8153bc86 detect duplicate declaration of pthread_atfork() in pthread.h 2018-02-06 20:21:21 +00:00
mrg
8fdd01b3ee fixes for GCC 6:
- -Wstrict-prototypes is not available for C++, so don't try to
  ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
  with arguments with nonnull attributes.  in two cases, leave
  code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
  to assume the caller will have a frame.fair
2018-02-04 01:13:45 +00:00
christos
b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
christos
85bf85b701 make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8
2017-12-08 01:19:29 +00:00
maya
a1df7aec01 Add endian.h header. Simply includes sys/endian.h
<endian.h> has been accepted by the austin group.
2017-10-16 11:38:25 +00:00
christos
96a83291ba remove recallocarray 2017-10-07 21:15:48 +00:00
christos
345c694682 add recallocarray (used by openssh-7.6) 2017-10-07 19:38:09 +00:00
joerg
29f5b623d9 Add missing strfmon_l. Noticed by Bruno Haible. Add test case. 2017-08-16 13:53:19 +00:00
christos
7b923e1c00 s/not sure why// and make these work :-) 2017-08-16 08:35:48 +00:00
joerg
e5678be828 Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.
2017-07-11 15:21:31 +00:00
kre
486691905e Add the new signalname/signalnext/signalnumber interface to libc.
This as discussed on current-users in the thread
entitled:
  Proposal: new libc/libutil functions to map SIGXXXX <-> "XXXX"
that can be found (starting at):
  http://mail-index.netbsd.org/current-users/2017/04/28/msg031600.html

These functions provide the mechanism to enable applications
to divorce themselves from internal details of the signal
implementation.

Libc minor bumped, prototypes in <signal.h>, sets lists updated (and sorted).

One and all: feel free to improve the sources & man page (etc), but
please do not change the function signatures without discussion.
2017-05-09 11:14:16 +00:00
christos
f81dba2062 Add vis DQ. 2017-04-23 01:57:36 +00:00
christos
395ebe609b fexcept_t + fenv_t should be handled the same way for softfloat 2017-04-09 15:29:07 +00:00
sevan
a15505744d Add RCS tag. 2017-04-04 12:25:40 +00:00
chs
7e30e94394 provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
2017-03-22 23:11:07 +00:00
scole
e3edf3b621 Add fenv for ia64, imported from FreeBSD, compile tested only. 2017-02-23 02:05:30 +00:00
christos
a8c3505052 add _PATH_DEVZERO 2017-01-16 19:15:28 +00:00
christos
9279f94b7e elide strict-prototypes for unrepresentable function 2017-01-15 20:10:25 +00:00
christos
86268722b0 Welcome to the constant age! 2017-01-12 18:42:53 +00:00