Commit Graph

9982 Commits

Author SHA1 Message Date
christos 4dddbc1f8d put the state back after it is used. 2015-10-26 19:41:19 +00:00
christos 208f128939 PR/50367: Stefan Schaeckeler: Apply fix to obey RES_CHECKNAME to getnetbyaddr
and getnetbyname.
2015-10-26 19:28:53 +00:00
christos a7b9f27a41 PR/50367: Stefan Schaeckeler: libc resolver library does not resolve host
names with underscores ("_"). According to resolv.conf(5) RES_NOCHECKNAME
is on by default; well, it is and gethostbyname(3) obeys it
(gethnamaddr.c:maybe_ok), but getaddrinfo(3) up till this commit not.
XXX: pullup-7, pullup-6
2015-10-26 14:48:04 +00:00
roy 4557363ec4 Use strerror(3) instead of strerror_r(3) and an arbitary buffer size which could be too small. 2015-10-26 11:44:30 +00:00
pooka 3a6246a644 Don't include daemon.c in RUMPRUN=yes mode.
The standard implementation uses fork(), needs an alternative
implementation for Rumprun.
2015-10-25 16:01:04 +00:00
christos f9589d4feb Release 2015g - 2015-10-01 00:39:51 -0700
Changes affecting code

    localtime no longer mishandles America/Anchorage after 2037.
    (Thanks to Bradley White for reporting the bug.)

    The localtime module allows the variables 'timezone', 'daylight',
    and 'altzone' to be in common storage shared with other modules,
    and declares them in case the system <time.h> does not.
    (Problems reported by Kees Dekker.)

    On platforms with tm_zone, strftime.c now assumes it is not NULL.
    This simplifies the code and is consistent with zdump.c.
    (Problem reported by Christos Zoulas.)

  Changes affecting documentation

   The tzfile man page now documents that transition times denote the
   starts (not the ends) of the corresponding time periods.
   (Ambiguity reported by Bill Seymour.)
2015-10-09 17:21:45 +00:00
christos a786eb43af PR/50295: Fix clock_nanosleep return value documentation. 2015-10-02 19:52:49 +00:00
christos 1ede8275d7 - fix various leaks on error
- don't use the wrong error variable in switch
- always set the error return code
- return consistent errors when the input data cannot be handled.
2015-09-22 16:16:02 +00:00
christos 525756d35c be more forgiving, and don't abort on unexpected errors. 2015-09-22 16:15:08 +00:00
christos b350f7a434 Handle herrors properly so that postfix can return 4XX codes when appropriate.
Pointed out by Viktor Dukhovni.
2015-09-22 14:46:09 +00:00
christos aa52694f67 use the unsigned char version of the input char in all cases "cap[uc]" to
avoid accessing cap[negative], found by Elliott Hughes
2015-09-12 19:08:47 +00:00
christos ebe26a98ee namespace protect allocaddrinfo 2015-09-10 14:05:06 +00:00
christos 37cb794041 mke allocaddrinfo static. 2015-09-10 11:33:27 +00:00
ozaki-r 0cea365c35 Include several libc functions in rump.ping6
We need getaddrinfo, getifaddrs, if_indextoname and if_nametoindex
in addition to getnameinfo.
2015-09-09 10:06:05 +00:00
mrg 20f519c75f add a bunch of functions found in <stdio.h> that weren't listed here.
(this list may still be incomplete.)
2015-09-06 04:20:50 +00:00
pgoyette 04194d2b38 English grammar nit: there's only one function described in this man page 2015-09-06 03:10:50 +00:00
dholland 110c72e16b Improve the short description. 2015-09-06 01:37:35 +00:00
dholland 87aa30da64 SEE ALSO fmemopen(3) 2015-09-06 01:36:21 +00:00
dholland eba062b188 Mention fmemopen(). 2015-09-06 01:35:34 +00:00
christos 33eb4d867d PR/50195: Henning Petersen: Incorrect check in getnameinfo_link. 2015-09-03 15:01:19 +00:00
jnemeth 14a099927b PR/49641 - Henning Petersen -- wordo 2015-09-03 04:05:38 +00:00
kamil 1c79b1c709 ANSIfy getopt(3) - this is the REPLACE_GETOPT version from getopt_long(3)
For the reference, this version still passes the current set of ATF tests
for the getopt(3) function.

This version is by default unused.
2015-09-01 19:39:57 +00:00
ozaki-r 3296ce621c Fix rump.ndp -I options by rump-ifying if_nametoindex(3)
From s-yamaguchi@IIJ
2015-09-01 09:54:34 +00:00
kamil 596fd5662e Constness correction for the getopt(3) function under REPLACE_GETOPT
Use the __UNCONST() macro, which is used in the other parts for the same
argument nargv, but under the !REPLACE_GETOPT namespace.
2015-09-01 01:28:17 +00:00
joerg e78620fb9b Don't unconditionally pass MLIBDIR via CPPFLAGS. Drop now dead branch. 2015-08-28 11:45:02 +00:00
wiz 89df855eb5 Update for v1.10: use '(*)' instead of '#' as dagger replacement.
dholland finds the '#' unintuitive and hard to read.
2015-08-22 14:04:54 +00:00
kamil 3bff2c862b Minor alterations to reallocarr(3)
Add comment about division.
Mark error branches with __predict_false().
Reduce one branch with the OR trick.
2015-08-20 22:27:49 +00:00
joerg b7742922d5 Fix portability. 2015-08-20 20:08:04 +00:00
pooka 71859f7093 In rumprun mode on ARM, don't build syscall or signal code into libc.
(like on x86)
2015-08-20 16:13:40 +00:00
wiz b23bf62e84 Bump date for previous. 2015-08-20 11:05:06 +00:00
pgoyette 2c11157aee P1003_1B_SEMAPHORE is no longer optional 2015-08-20 10:42:09 +00:00
riz f2164b60c8 Remove second 'const' declaration, to hopefully fix clang builds. 2015-08-18 16:54:27 +00:00
christos d856f74aad merge 2015f 2015-08-13 11:21:18 +00:00
ginsbach b6db50f38d Only apply am/pm adjustment to tm_hour when it has actually been parsed. 2015-07-29 20:32:54 +00:00
kamil 638c990b9a Compatibility fixes in reallocarr(3)
Make this work on !NetBSD platforms:
- replace __CTASSERT() with platform agnostic solution SQRT_SIZE_MAX
- include nbtool_config.h for cross builds to get definition of __RCSID()
- restore errno in the last rare code path for platforms affecting errno(2)
  in memcpy(2)

While there: rename parameter name 'num' to 'number' to be in sync with
the calloc(3) parameter naming.

Reported by scole_mail at the current-users ml.
2015-07-28 17:13:34 +00:00
wiz d54956fea0 Spacing; Fn -> Xr for jemalloc. 2015-07-26 22:32:03 +00:00
martin def993fa14 Defer using pthread keys until we are threaded.
From Christos, fixes PR port-arm/50087 by allowing malloc calls prior
to libpthread initialization.
2015-07-26 17:21:55 +00:00
kamil 13f3706081 Add history of allocators
Idea accepted by <christos>
No objctions from <riastradh>
2015-07-26 17:09:29 +00:00
christos c0c6a84ba3 From Timo Buhrmester: Fix wrong parameter description 2015-07-26 17:03:06 +00:00
kamil 4f643221a3 mandoc lint 2015-07-26 17:00:37 +00:00
kamil dc83c1546e Add license header (the NetBSD 2-clause version) with (C) TNF 2015-07-26 02:29:44 +00:00
kamil ec6de4df8b reallocarray(3) cleanup
Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE
2015-07-26 02:22:33 +00:00
ginsbach 8b0d942b48 More KNF style changes -- consistent use of whitespace in #defines. 2015-07-22 13:33:59 +00:00
ginsbach 2cacd9205d KNF and additional comments 2015-07-20 14:37:11 +00:00
kamil f1354ae7ef Reorder memcpy(3) and save errno
This change is for safety as memcpy(3) might change it.

Approved by <riastradh>
2015-07-16 00:03:59 +00:00
christos 90b9d61d73 Allow changing the default buffering policy for a stdio stream during
construction by setting environment variables.
2015-07-15 19:08:43 +00:00
pooka 7db5875437 Don't include sigtramp or foocontext routines in rumprun mode. They won't
work (since a rump kernel does not provide NetBSD _lwp syscalls nor
signals), but they cause unwanted symbols to be pulled in when the
resulting libc is linked.

problem reported by Robert Gifford on rumpkernel-users
2015-07-15 14:27:49 +00:00
pooka db8ece9eea Remove "objects built from C sources" comments. Everyone can see
they're built from C sources because the source files end in .c (???)
2015-07-15 14:23:40 +00:00
ginsbach f7bfe448b0 Don't set state when parsing any timezone (%z) information. The '+' in
this case isn't the same as the FreeBSD '%+' str[fp]time() (GNU) extension.
2015-07-15 13:54:38 +00:00
ginsbach d2fb39874a Set S_WDAY state for %u (same as it is set for %w). 2015-07-14 18:07:17 +00:00