Commit Graph

1554 Commits

Author SHA1 Message Date
snj 3cd4aa2368 Pull up following revision(s) (requested by roy in ticket #648):
common/lib/libc/stdlib/_strtoi.h: revisions 1.1, 1.2
	common/lib/libc/stdlib/strtoi.c: revision 1.1
	common/lib/libc/stdlib/strtou.c: revision 1.1
	distrib/sets/lists/base/ad.aarch64: patch
	distrib/sets/lists/base/ad.arm: patch
	distrib/sets/lists/base/ad.mips: patch
	distrib/sets/lists/base/ad.powerpc: patch
	distrib/sets/lists/base/md.amd64: patch
	distrib/sets/lists/base/md.sparc64: patch
	distrib/sets/lists/base/shl.mi: patch
	distrib/sets/lists/comp/mi: revision 1.1939
	distrib/sets/lists/debug/ad.aarch64: patch
	distrib/sets/lists/debug/ad.arm: patch
	distrib/sets/lists/debug/ad.mips: patch
	distrib/sets/lists/debug/ad.powerpc: patch
	distrib/sets/lists/debug/md.amd64: patch
	distrib/sets/lists/debug/md.sparc64: patch
	distrib/sets/lists/debug/shl.mi: patch
	include/inttypes.h: revision 1.11
	lib/libc/shlib_version: patch
	lib/libc/stdlib/Makefile.inc: revision 1.84
	lib/libc/stdlib/strtol.3: revisions 1.27-1.31
	lib/libc/stdlib/strtoul.3: revisions 1.26-1.29
	sys/lib/libkern/Makefile.libkern: revision 1.37
	sys/lib/libkern/libkern.h: revision 1.117
	tools/compat/Makefile: revision 1.73
	tools/compat/compat_defs.h: revision 1.101
	tools/compat/configure.ac: revision 1.83
	tools/compat/configure: revision 1.82
	tools/compat/nbtool_config.h.in: revision 1.36
add strto{i,u} from Kamil Rytarowski as discussed in tech-userlevel.
--
strtoi and strtou additions
--
strtoi and strtou for the kernel
--
strtoi and strtou additions
--
strtoi and strtou man pages
--
strto{i,u}
--
regen
--
Remove trailing whitespace.
--
match variable names with man page (Kamil Rytarowski)
--
cleanups from (Kamil Rytarowski)
--
add strtoi strtou (Kamil Rytarowski)
--
PR/49640: Kamil Rytarowski: Improve error printing
--
Use existing month for Dd.
2015-04-22 07:18:57 +00:00
snj cb8b284dee Pull up following revision(s) (requested by wiz in ticket #642):
include/stdio.h: revision 1.96
	include/unistd.h: revision 1.145
Put fseeko, ftello, pread, and pwrite in the POSIX 2001 namespace.
Ok christos, apb, martin
2015-03-25 17:15:54 +00:00
martin 6b422b3954 Pull up following revision(s) (requested by khorben in ticket #547):
include/unistd.h: revision 1.144
	sys/kern/syscalls.master: revision 1.272

PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong.
2015-02-24 10:47:17 +00:00
snj 744af26d46 Pull up following revision(s) (requested by martin in ticket #416):
distrib/sets/lists/comp/md.hppa: revision 1.3
	include/fenv.h: revision 1.13 via patch
	lib/libm/Makefile: revision 1.168
	lib/libm/arch/hppa/fenv.c: revisions 1.1, 1.2
	sys/arch/hppa/include/Makefile: revision 1.12
	sys/arch/hppa/include/fenv.h: revisions 1.1, 1.2
	sys/arch/hppa/include/ieeefp.h: revisions 1.5-1.7
	tests/lib/libm/Makefile: revision 1.29 via patch
fenv(3) support for hppa
--
use unsigned over uint32_t so that this file works without stdint.h
being included before hand.
fixes mknative-gcc problems, and likely others.
--
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
--
Simplify, now that rounding mode defines match the hardware bits.
2015-01-20 20:57:24 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
christos 8e2b2a8fd3 cast to LHS type and minor KNF. 2014-08-07 17:24:03 +00:00
dholland d0352e761c Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
2014-07-25 08:30:47 +00:00
christos 6030f04a15 amend the new destroy function to take function pointers. 2014-07-20 20:17:21 +00:00
christos 842ee049dd Our hdestroy implementation was non-conformant because it freed the key of
each entry. Add a new function hdestroy1 that allows the user to control
what gets freed. Pointed out by Pedro Giffuni at FreeBSD.
2014-07-20 13:34:17 +00:00
christos e00a3615cf add mkostemp{s,} mkstemps from FreeBSD 2014-06-18 17:48:22 +00:00
christos b27e135433 rename to 60 2014-06-12 18:49:37 +00:00
christos 1eb0dcbb1d fix srandom and initstate signatures (from enh at google) 2014-06-12 18:44:36 +00:00
christos af46c9781f Always use the reentrant rpc_createerr. Otherwise every threaded program
that uses rpc needs to define _REENTRANT to work properly. We'll keep
compatibility but setting the old variable in the library, but we are not
advertising it anymore.
2014-06-06 14:31:24 +00:00
joerg a8b7899cfa Fix use of getline and friends in C++ code. 2014-05-23 16:48:52 +00:00
kleink eead6b988e Move declarations of getdelim() and getline() from the (incorrect) ANSI C
section to POSIX-2008.  From Jarmo Jaakkola in PR standards/48788.
2014-05-19 16:04:10 +00:00
pooka 366b2dd23e Apparently clang pretends to be gcc 4.2 but is secretly much awesomer
than gcc 4.2, so enable the stpncpy() wrapper also for clang.
2014-04-25 18:37:38 +00:00
pooka 232a041b7a Wrap stpncpy() iff GNUC_PREREQ(4,8). Fixes USE_SSP=yes builds
with gcc 4.5.
2014-04-24 20:12:56 +00:00
christos 73447a65e4 add stpncpy() 2014-04-06 19:29:58 +00:00
christos 5570e6936a __lwp_park60 2014-01-31 20:44:17 +00:00
christos 1102b348b0 Add the {v,}{warn,err}c function flavors from FreeBSD 2014-01-16 17:22:06 +00:00
christos eabc0dd171 add ptsname_r 2014-01-08 02:15:42 +00:00
christos a012ad3d35 PR/4891: Wiz: readlink moved from xopen to base at issue 5. 2014-01-02 23:33:50 +00:00
matt a9c8f9282e Make ptrdiff_t available in the kernel. 2013-12-12 17:53:03 +00:00
joerg aceb213538 Allow kernel code to access constant databases by moving cdbr(3) and the
required mi_vector_hash(3) into src/common.
2013-12-11 01:24:08 +00:00
joerg fcff7df126 Add cdbr_open_mem. 2013-12-05 21:17:23 +00:00
christos 115f51c7be add new internal functions 2013-12-01 00:23:11 +00:00
christos 96c26aba65 use a TAILQ instead of a CIRCLEQ, from FreeBSD 2013-11-22 16:25:01 +00:00
degroote 0809f57592 Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L 2013-11-21 09:09:52 +00:00
christos 53e3f1af8a gcc-4.8.1 is has a builtin stpncpy, but is missing the __builtin_ ssp
equivalent. go figure.
2013-11-07 02:00:54 +00:00
tron fb23e6a8a9 Revert my last change. I'm not convinced it is correct and while it seems
to fix some build problems it might cause others.
2013-11-07 00:02:58 +00:00
tron 24f67c8710 Add missing declarations for SSP versions of stpcpy(3) and stpncpy(3). 2013-11-06 21:33:12 +00:00
christos c15ffc1416 add stp{,n}cpy 2013-11-06 16:31:08 +00:00
njoly 0d88813605 Follow OpenGroup online specification[1], move
fchmodat/mkdirat/mkfifoat/mknodat prototypes to <sys.stat.h>.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
2013-10-09 09:38:21 +00:00
martin cc4812f36b Allow archs to provide __isinf() and __isnan() as inline functions instead
of macros.
2013-09-16 15:54:42 +00:00
riastradh 1239c2bb08 Publish explicit_memset and consttime_memequal in userland libc.
Remove the double-underscore from the userland versions, and do the
weak alias dance instead, now that these are public parts of libc.

As discussed on tech-userlevel:

https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
(option 3)
2013-08-28 17:47:07 +00:00
riastradh 495fdb7e9a Make explicit_memset match memset's return value. 2013-08-28 15:46:23 +00:00
joerg cc1cb97e40 Remove outdated comment. 2013-08-27 18:29:28 +00:00
joerg 7efdee83f2 Add strerror_l. 2013-08-19 13:03:12 +00:00
joerg 9c11b12444 Add nl_langinfo_l, catopen_l and wcsftime_l. 2013-08-19 08:03:33 +00:00
christos 2c0b172d86 fix gethostbyaddr prototype per TOG. 2013-08-19 07:18:42 +00:00
riastradh 82db4b9858 Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.
consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
2013-06-24 04:21:19 +00:00
joerg 85a67e61f7 Add mbsnrtowcs and wcsnrtombs. Approved by core. 2013-05-28 16:57:56 +00:00
joerg 844ef71922 Too many endif. 2013-05-17 14:11:55 +00:00
joerg 2aac8b87b0 Only provide LC_C_LOCALE under _NETBSD_SOURCE. 2013-05-17 13:00:40 +00:00
joerg e0ac190e1e Provide explicit LC_C_LOCALE accessor and drop the various NULL checks.
Provide LC_GLOBAL_LOCALE in a way that works with all locale functions.
Merge constant data used by the initial global locale and the C locale.
Drop function call layer for _current_locale() and directly return the
locale reference, not a pointer to it. Use protected access for global
variables, so that libc references can avoid the GOT overhead.
2013-05-17 12:55:56 +00:00
christos df2bc3e4f8 add the signal safe prototypes 2013-05-04 18:30:14 +00:00
riz 05108b4611 Add missing #endif (Hi, Christos!) 2013-05-04 00:37:47 +00:00
christos 017320144a PR/25827, PR/32373: addr AI_SRV 2013-05-03 19:34:13 +00:00
matt 8c629cb493 Add getbyteorder(void) prototype. 2013-05-02 07:17:35 +00:00
joerg 81d0329e8d Make that to process PATH_LOCALE the first time _find_category is
called. Use this to implement newlocale and provide duplocale/freelocale
as well. Based on patches by Takehiko Nozaki with simplications and fix
for the init order by myself.
2013-04-30 00:45:04 +00:00