Commit Graph

241 Commits

Author SHA1 Message Date
riastradh 719254e9b5 Bump libc minor for consttime_memequal and explicit_memset. 2013-08-28 18:01:22 +00:00
joerg a67fde0356 Add strtol_l and friends. Switch _citrus_bcs_strtol to use plain
strtol_l unless in tools mode. Add note to retire the BCS code on the
next libc major bump.
2013-04-16 21:44:06 +00:00
joerg e8fa8f4db7 Extend ctype classification table to 16bit. Based on patch by
Takehiko Nozaki, with changes to compile fail when using the old names
and to exploit __BUILD_LEGACY
2013-04-13 10:21:20 +00:00
joerg 575a4660cc Rename BUILDCOLD to BUILD_LEGACY and provide a preprocessor macro that
can be used in code files that aren't easy to split up. Add the removal
to the major bump todo list.
2013-04-12 19:58:45 +00:00
joerg e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
joerg 570a37472e Remove alloca when we get a chance to avoid issues like PR lib/47120.
With an modern optimising compiler, backend integration is necessary as
soon as frame pointers are optional.
2012-10-24 20:14:55 +00:00
dholland 7376117cc5 Some more notes for libc bump time that I had lying around. 2012-08-24 06:12:52 +00:00
dholland 057a51dacf Note that when the mythical libc bump comes, one of the things we should
do is punt ruserok() and its related apparatus out to libcompat.
(Or perhaps just remove it entirely.)
2012-07-17 05:41:30 +00:00
darrenr 3ec957d580 bin/46703: BSD r-commands use wrong source address for stderr
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46703
Bump libc minor for the addition of rresvport_af_addr()
2012-07-14 15:06:26 +00:00
rmind ea196989a7 Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
The code is taken from the upstream and is in the public domain.

OK christos@
2012-07-08 01:21:11 +00:00
joerg 4acff4c01b Implement sem_timedwait. 2012-03-08 21:59:24 +00:00
joerg f46fb1259f Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
2012-02-27 12:26:21 +00:00
dholland 6c69bdb74e Note that gets() is finally dead in C11 and can be removed if we ever
bump libc.
2012-02-24 16:06:39 +00:00
joerg 52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
martin 19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
christos 1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
joerg bd40a21a42 Add comment about the name overlap with libcrypto for SHA2 and friends 2011-11-08 16:25:25 +00:00
christos 0786f153d9 bump for hcreate_r and friends 2011-09-18 23:57:06 +00:00
christos e2bebf7172 * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.
2011-06-26 16:42:39 +00:00
christos 2d8f83e77b Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
  between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
  the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
  the buffer is not large enough, instead of silently truncating.
2011-03-12 19:52:45 +00:00
christos 6f31775ce6 bump for arc4random_{buf,uniform} 2011-02-04 22:07:41 +00:00
christos 5a87b22ec6 Provide a re-entrant and thread-safe set of timezone API's that
don't require locking and can operate on user-specified timezones
as opposed to having to alter the environment to change a timezone.
This work was presented to the tzcode folks and it was generally
accepted, but there seems to be a lot of inertia.
2010-12-16 18:36:47 +00:00
tnozaki 93b7363c93 add fmemopen(3) derrived from POSIX:2008.
libc minor bump.
2010-09-24 09:21:53 +00:00
tnozaki 9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
joerg b9cf7d31ab Add the constant database reader (cdbr(3)) and writer ((cdbw(3)).
They implement a space efficent write-once database with fast access
path. Switch the services(5) database to use cdb. The size of the
database file decreases from 2.1MB disk space to 307KB. Access
performance is about the same if setservent(0) is used and about an
order of magnitude faster otherwise. services_mkdb defaults to the new
format, but can optionally create the old db(3) format as well for
statically linked legacy applications.
2010-04-25 00:54:44 +00:00
tnozaki 19f5aa7162 MB_LEN_MAX should moved from MD to MI. 2010-03-28 14:08:22 +00:00
tsarna 1f4f234ea9 Introduce allocaddrinfo(3) to make writing getaddrinfo() nss plugins easier.
Discussed on tech-net.
2009-10-02 02:45:28 +00:00
christos f227975929 Version fts one more time! This is the most versioned API ever... Bump
fts_level from short to int to avoid a potential DoS.
From Maksymilian Arciemowicz
2009-08-16 19:33:38 +00:00
joerg d6e219476b Add a fast, platform independent hash function to libc.
The algorithm used is the Jenkins hash.  The name (mi_vector_hash)
reflects the nature of the hash function.
Add glue for libc ATF tests and include a test case to make sure that
(mis)alignment and endianess are handled correctly.

Bump libc minor to 169.
2009-07-20 17:03:36 +00:00
joerg 09d5d44150 Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
2009-05-26 08:04:11 +00:00
perry be11851995 Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.
2009-05-01 17:27:01 +00:00
christos 59a755a40f merge libbind and bump. 2009-04-12 17:07:16 +00:00
christos d4bf2b400d take the opportunity of the glob_pattern_p and add memrchr. 2009-04-10 23:14:07 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
tnozaki 38eee9115b add more item for major bump:
_ctype_ table in ctype.h and gen/ctype_.c has insufficient bitwidth.
2009-01-05 07:50:23 +00:00
ad 12c911ef99 Add more items for major bump. 2008-12-28 10:59:20 +00:00
matt 0ad7281825 Add new ptree (Patricia / RADIX tree) implementation to NetBSD. 2008-11-20 23:50:08 +00:00
matt cac8e44915 Add C99 functions imaxabs and imaxdiv. 2008-08-04 21:29:27 +00:00
matt 48717a981d Move rb.c from sys/lib/libkern to common so it can be in both libc and libkern. 2008-06-30 19:03:59 +00:00
ad c6f43a476e Crank libc minor for getlogin_r 2008-06-25 11:12:01 +00:00
christos 3873655b27 updates from bind-9-5-0 2008-06-21 20:41:48 +00:00
yamt 49716be5e2 a little more about fpos_t. 2008-05-03 07:06:30 +00:00
christos 640f4f7d25 mention thread local support. 2008-05-01 15:52:31 +00:00
christos a8706a45b4 mention ldexp, frexp, modf. 2008-04-27 09:26:20 +00:00
tnozaki 690d9c4d8a add comment about renaming of setlocale -> __setlocale_mb_len_max32. 2008-03-24 12:54:38 +00:00
yamt 7f068c6aa5 mention fpos_t 2008-03-23 15:33:26 +00:00
christos 749de7f2a4 Since _file is a short, check that the fd fits in it, otherwise bail with
EMFILE. We treat _file as an unsigned short to double our range, with a
special case for -1 (closed). Make a note of what we should do about stdio
if we ever bump libc. We could change _file in the future compatibly to an
int by putting it in the extension space but for now we don't bother.
2008-03-13 15:40:00 +00:00
ad 749400b704 Crank minor for atomic ops. 2008-02-10 18:47:06 +00:00
ad bbc79e58a6 Pull in my modules code for review/test/hacking. 2008-01-16 12:34:50 +00:00
christos 6d28b23da6 - add dehumanize_number
- decls for humanize_number and dehumanize_number are in stdlib.h
2007-12-14 17:26:19 +00:00