Commit Graph

10946 Commits

Author SHA1 Message Date
dholland ad8aa774f5 fix duplicated chunk from merge 2019-01-27 04:33:29 +00:00
dholland a5dfc9a7f2 fix another mergeo 2019-01-27 02:42:32 +00:00
dholland f4d9309d1d fix mergeo 2019-01-27 02:40:49 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
christos c959ea2c0d PR/53904: Jintao Zhu: Use a mutex instead of an rwlock to assure thread safety 2019-01-24 18:01:38 +00:00
mrg 1fbe8d0596 remove diag assert - the compiler demands fp is non NULL now. 2019-01-23 00:05:47 +00:00
wiz f401b5d182 Use \- for minus. 2019-01-15 07:01:01 +00:00
uwe 3e392f0443 Fly, nasal demons, fly away... 2019-01-15 03:43:15 +00:00
riastradh f5a847d300 Use the same variable for the locale example. 2019-01-15 03:30:58 +00:00
uwe 326784a6c3 Don't talk about "the first argument" when there's only one. 2019-01-15 01:23:49 +00:00
uwe 31759755bb Fix markup pasto. 2019-01-15 01:13:49 +00:00
uwe 2a102dd013 Remove the extra cast to int in the CAVEATS example.
We removed it from EXAMPLES a few releases ago.
2019-01-15 01:11:03 +00:00
uwe 893d5ca890 Fix typo in macro flag. 2019-01-15 00:43:32 +00:00
riastradh 2712861341 Expand on correct and incorrect usage, and on compiler warnings.
Give an example program with the warning, and some example nonsense
outputs.  Also note why glibc's approach doesn't solve the problem.
2019-01-15 00:31:19 +00:00
christos f0d7eb24ef use the pico objects if we are making a PIC profiled library. 2019-01-06 18:14:10 +00:00
christos 76c767265c Release 2018i - 2018-12-30 11:05:43 -0800
Briefly:
    São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.

  Changes to future timestamps

    Due to a change in government, São Tomé and Príncipe switches back
    from +01 to +00 on 2019-01-01 at 02:00.  (Thanks to Vadim
    Nasardinov and Michael Deckers.)


Release 2018h - 2018-12-23 17:59:32 -0800

  Briefly:
    Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
    New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
    Metlakatla, Alaska observes PST this winter only.
    Guess Morocco will continue to adjust clocks around Ramadan.
    Add predictions for Iran from 2038 through 2090.

  Changes to future timestamps

    Guess that Morocco will continue to fall back just before and
    spring forward just after Ramadan, the practice since 2012.
    (Thanks to Maamar Abdelkader.)  This means Morocco will observe
    negative DST during Ramadan in main and vanguard formats, and in
    rearguard format it stays in the +00 timezone and observes
    ordinary DST in all months other than Ramadan.  As before, extend
    this guesswork to the year 2037.  As a consequence, Morocco is
    scheduled to observe three DST transitions in some Gregorian years
    (e.g., 2033) due to the mismatch between the Gregorian and Islamic
    calendars.

    The table of exact transitions for Iranian DST has been extended.
    It formerly cut off before the year 2038 in a nod to 32-bit time_t.
    It now cuts off before 2091 as there is doubt about how the Persian
    calendar will treat 2091.  This change predicts DST transitions in
    2038-9, 2042-3, and 2046-7 to occur one day later than previously
    predicted.  As before, post-cutoff transitions are approximated.

  Changes to past and future timestamps

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
    It did not change clocks that day and remains on -08 this winter.
    (Thanks to Ryan Stanley.)  It will revert to the usual Alaska
    rules next spring, so this change affects only timestamps
    from 2018-11-04 through 2019-03-10.

  Change to past timestamps

    Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
    not 00:00.  I transcribed the time incorrectly from Shanks.
    (Thanks to Phake Nick.)

    Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
    (Thanks to Phake Nick.)

    Guam observed DST irregularly from 1959 through 1977.
    (Thanks to Phake Nick.)

    Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
    10-01 changed standard time to +08:30 (not +08).  Its transition
    back to +08 after WWII was on 1945-09-15, not the previous day.
    Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
    (Thanks to Phake Nick, Steve Allen, and Joseph Myers.)  Also,
    its 1952 fallback was on 11-02 (not 10-25).

    This release contains many changes to timestamps before 1946 due
    to Japanese possession or occupation of Pacific/Chuuk,
    Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
    Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
    (Thanks to Phake Nick.)

    Assume that the Spanish East Indies was like the Philippines and
    observed American time until the end of 1844.  This affects
    Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.

  Changes to past tm_isdst flags

    For the recent Morocco change, the tm_isdst flag should be 1 from
    2018-10-27 00:00 to 2018-10-28 03:00.  (Thanks to Michael Deckers.)
    Give a URL to the official decree.  (Thanks to Matt Johnson.)
2019-01-01 03:04:56 +00:00
wiz 76792de36e Use An in AUTHORS section. 2018-12-17 08:18:06 +00:00
abhinav 3cf9f52098 Remove self reference in SEE ALSO
Add references consistent with those in md4(3) and md5(3)

Reported by kamil
2018-12-16 14:08:48 +00:00
uwe cb6634cf44 Don't leave a subordinate clause out in the cold. 2018-12-14 03:43:22 +00:00
uwe e8277867b9 Fix typo in the function comment. 2018-12-14 03:29:54 +00:00
maya 62523467d4 Remove unused macro 2018-12-13 08:45:29 +00:00
maya 3ba1def22c Remove unused macro. 2018-12-13 08:39:34 +00:00
dholland c46ad0a300 Adjust English usage in message for EAI_NONAME. 2018-12-13 04:41:41 +00:00
dholland aaa03614bc Return EAI_NODATA, not EAI_NONAME, for nonexistent hosts.
This causes e.g. "ssh nosuchname" to print "No address associated with
hostname", which is correct, rather than "hostname nor servname
provided, or not known", which is not.
2018-12-13 04:30:55 +00:00
christos dda6d8cae4 fix grammar. 2018-12-09 20:29:53 +00:00
tih 138c67b5ef Summary: Align softfloat float128 with libgcc.
While libgcc adapts its float128 data structure to the endianness of
the architecture, the softfloat code in libc didn't.  With both of
them handling the same values, softfloat must follow the toolchain.

OK: riastradh
2018-12-06 19:17:13 +00:00
kamil cae5584ffc Correct handling of minval > maxval in strtonum(3)
The original implementation in OpenBSD returns "invalid" and avoids reading
the input string. The replaced behavior was interpreting the input string
ignoring the invalid arguments.
2018-12-06 06:29:56 +00:00
kamil cfb2a8fe4d Correct the documentation of cdbr_open_mem(3)
Fix function prototype in the man-page.
Add link cdbr_open_mem(3) -> cdbr(3).
2018-12-01 02:43:43 +00:00
wiz f3f43bfe46 More macros, less whitespace. 2018-11-27 10:38:14 +00:00
kamil 80ee9b513a Fix link sha1.3 <- SHA1File.3
This SHA1File used to link to sha2(3).
2018-11-27 03:56:37 +00:00
kamil 99255a5dff Document SHA1FileChunk(3) in sha1(3)
Description taken from OpenBSD.
2018-11-27 03:29:36 +00:00
skrll 031e68cbb9 Update comments to help explain what's going on 2018-11-23 12:39:18 +00:00
skrll 5c89cda337 Fix so the setcontext call is via the PLT and libpthread can override 2018-11-23 11:38:07 +00:00
ryo 466808d25b fix condition code. x1==0 is parent. 2018-11-22 08:30:58 +00:00
skrll df8c50d73f _REG_LR should be _lwp_exit 2018-11-21 21:24:42 +00:00
skrll 81f196752c Fix some register names in comments 2018-11-21 21:04:15 +00:00
skrll 916ea5ef0d Fix a comment 2018-11-21 21:01:41 +00:00
ryo b3731ba225 fix type of argument for va_arg; don't round to 32bit. 2018-11-16 10:51:08 +00:00
riastradh 0cc7838e19 Attempt to implement fabsf by copying fabs and s/d/f/g.
Vax wizards, please vaxinate if I flubbed this!
2018-11-08 18:19:37 +00:00
riastradh 7b66ed5df0 Use the generic C fabs/fabsl on ia64 for now to unbreak the build. 2018-11-08 16:36:16 +00:00
riastradh 3e49d37969 powerpc64 needs fabsl too. (Apparently no __HAVE_LONG_DOUBLE?) 2018-11-08 16:31:46 +00:00
riastradh e84f49ed3d Try speling it rite, riasthradhdadhaa or whatever your name is. 2018-11-08 16:29:50 +00:00
msaitoh 169880b3b2 "s/ an an / an /" in comment. No functional change. 2018-11-08 06:43:52 +00:00
riastradh cdb65da578 On ports without __HAVE_LONG_DOUBLE, make fabsl alias fabs.
For some reason, fabs lives in libc, not in libm, and our tests now
detect when fabs or fabsl is missing from libm.  For those ports that
sometimes have long double and sometimes don't, make it conditional.

Still missing: fabs _and_ fabsl on ia64.  Need help from an itanium
wizard!  Other portmasters: Please take a look and see if I missed
any ports that might have long double where this alias will not work.
2018-11-07 22:21:42 +00:00
wiz b572c9cad3 Fix xref. 2018-11-05 09:18:55 +00:00
maya 81e6878869 Suggest to remove lfs_ stubs on a major bump.
they're deprecated, ioctl is used instead.
2018-11-05 04:08:39 +00:00
christos 2d24b2e817 - Introduce a new SO_RERROR socket option to explicitly turn on
receive overflow errors re-instating the default behavior to
  silently ignore them as before 2018-03-19.
- Introduce a new kern.sooptions sysctl to control the default
  behavior of socket options. Setting this to 0x4000 (SO_RERROR),
  turns on receive overflow error reporting for all sockets.
- Change dhcpcd to turn on SO_RERROR on all its sockets.

As discussed in tech-net.
2018-11-04 16:30:28 +00:00
christos 273e6379f5 Welcome tzcode-2018g
Changes to code

    When generating TZif files with leap seconds, zic no longer uses a
    format that trips up older 32-bit clients, fixing a bug introduced
    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
    for QTBUG-53071 now also works for TZif files with leap seconds.

    The translator to rearguard format now rewrites the line
    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
    and earlier.  (Reported by Christos Zoulas.)

  Changes to documentation

    tzfile.5 has new sections on interoperability issues.
2018-10-27 22:29:24 +00:00
christos b2b04f7e8a Update to 2018f:
Changes to code

    zic now always generates TZif files where time type 0 is used for
    timestamps before the first transition.  This simplifies the
    reading of TZif files and should not affect behavior of existing
    TZif readers because the same set of time types is used; only
    their internal indexes may have changed.  This affects only the
    legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and
    EET, which previously used nonzero types for these timestamps.

    Because of the type 0 change, zic no longer outputs a dummy
    transition at time -2**59 (before the Big Bang), as clients should
    no longer need this to handle historical timestamps correctly.
    This reverts a change introduced in 2013d and shrinks most TZif
    files by a few bytes.

    zic now supports negative time-of-day in Rule and Leap lines, e.g.,
    "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition
    occurs at 18:00 on the Saturday before the last Sunday in April.
    This behavior was documented in 2018a but the code did not
    entirely match the documentation.

    localtime.c no longer requires at least one time type in TZif
    files that lack transitions or have a POSIX-style TZ string.  This
    future-proofs the code against possible future extensions to the
    format that would allow TZif files with POSIX-style TZ strings and
    without transitions or time types.

    A read-access subscript error in localtime.c has been fixed.
    It could occur only in TZif files with timecnt == 0, something that
    does not happen in practice now but could happen in future versions.

    localtime.c no longer ignores TZif POSIX-style TZ strings that
    specify only standard time.  Instead, these TZ strings now
    override the default time type for timestamps after the last
    transition (or for all time stamps if there are no transitions),
    just as DST strings specifying DST have always done.

    leapseconds.awk now outputs "#updated" and "#expires" comments,
    and supports leap seconds at the ends of months other than June
    and December.  (Inspired by suggestions from Chris Woodbury.)

  Changes to documentation

    New restrictions: A Rule name must start with a character that
    is neither an ASCII digit nor "-" nor "+", and an unquoted name
    should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~".
    The latter restriction makes room for future extensions (a
    possibility noted by Tom Lane).

    tzfile.5 now documents what time types apply before the first and
    after the last transition, if any.

    Documentation now uses the spelling "timezone" for a TZ setting
    that determines timestamp history, and "time zone" for a
    geographic region currently sharing the same standard time.

    The name "TZif" is now used for the tz binary data format.

    tz-link.htm now mentions the A0 TimeZone Migration utilities.
    (Thanks to Aldrin Martoq for the link.)
2018-10-19 23:05:35 +00:00
kamil b50859a9e1 Drop Pad functions from sha2(3)
This man-page first appeared before porting all the features to NetBSD and
actually Pad ones were never ported. Keeping it in the documentation is
misleading and actually caused bugs in handling of these functions in 3rd
party software.
2018-10-09 11:36:35 +00:00
kre d794b9b637 HACK: if calling dirname() with the results of a previous dirname()
there is no need to copy the path into the output buffer, it is already
there....

All this has to change to become compat with a forthcoming POSIX update.
2018-09-27 00:45:34 +00:00
maxv c698ced324 fix references, the things were moved into netipsec/ a while ago 2018-09-06 09:28:00 +00:00
christos 48875230b6 Allow being compiled as a tool. 2018-08-30 12:06:06 +00:00
ryo 4f574380a4 delete __{ge,lt,gt,le,eq,ne,unordt}tf2.
these should not be defined in libc.

pointed out by joerg@. thanks.
2018-08-27 16:46:13 +00:00
msaitoh fba7dcecac - SIOCGIFINDEX was added in 2013, but if_freenameindex(3) have not used it
for years. Use it to improve performance. Same as FreeBSD.
- KNF.
2018-08-22 03:12:31 +00:00
martin 7dba0fd9ed PR standards/53525: move getsubopt to stdlib.h 2018-08-15 10:49:47 +00:00
wiz 4e9665c6ea Sort SEE ALSO. 2018-08-13 06:08:48 +00:00
wiz c9911a308e Various improvements.
More markup, sort errors, fix -1.
2018-08-13 06:00:21 +00:00
ryo fae343b8b2 fix multiple definition of __{ge,lt,gt,le,eq,ne,unordt}tf2 in libc and libgcc.
this fixes the ATF call_once_static, call_once2_static, cxxruntime_static, static_destructor_static.
2018-08-11 10:06:40 +00:00
kamil c85fcdfeed Merge FreeBSD improvements to the man-page of timespec_get(3)
Keep NetBSD references instead of FreeBSD ones included in the FreeBSD
version.
2018-08-10 20:35:52 +00:00
ryo e6a0182575 need to set _UC_TLSBASE of uc_flags for _lwp_makecontext().
pointed out from skrll@. thanks.
2018-08-04 10:22:09 +00:00
kamil 93bf963a4b Restrict -fno-sanitize=function to Clang/LLVM only
The base GCC version 6,x does not support this option.
2018-08-03 14:01:21 +00:00
kamil d92938e14a Add a support to build ubsan.c in libc
Under the condition of MKLIBCSANITIZER==yes link ubsan.c into libc.

This is a clean-room reimplementation from scratch of the Undefined
Behavior runtime called micro-UBSan (or uBSan - user-UBSan).
2018-08-03 04:29:35 +00:00
kamil 7517542c29 Disable sanitization of -fsanitize=function in libc
Generated code for the checks (in at least libunwind) depends on the C++
runtime feature of RTTI.

Pass -fno-sanitize=function to LIBCSANITIZERFLAGS.
2018-08-03 02:29:35 +00:00
rjs f78bd2661d Add missing SCTP manpage. 2018-08-02 10:18:19 +00:00
rjs 97b85c8c95 Add userland support for SCTP and manpages. 2018-08-02 08:40:47 +00:00
ryo 90a07881a6 fix long double NaN definition. 2018-08-01 19:59:49 +00:00
sevan 8757822cde Remove ISO references 2018-07-31 22:28:26 +00:00
rjs 4dbc455943 Userland changes for getsockopt2(). 2018-07-31 13:04:09 +00:00
maya 726d0d156a it's C18, not C17. 2018-07-27 15:15:30 +00:00
maya b91e8b8ee6 Claim C17 (although I'm unsure), add a note about C11's requirements. 2018-07-27 14:34:44 +00:00
maya 8d702a64ca C17 conformance: aligned_alloc's size doesn't need to be a multiple of
alignment any more.

Thanks Joseph Myers for the heads up.
2018-07-27 13:08:47 +00:00
kamil 21d1b523b3 Avoid undefined behavior in ftok(3)
Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

ftok.c:56:10, left shift of 123456789 by 24 places cannot be represented in type 'int'
ftok.c:56:10, left shift of 4160 by 24 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-26 00:05:28 +00:00
kamil 1a4c49b997 Avoid undefined behavior in the definition of LAST_FRAG in xdr_rec.c
Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this in the LAST_FRAG symbol.

xdr_rec.c:559:39, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:572:26, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:573:25, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:632:37, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:711:32, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:722:28, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-25 23:59:08 +00:00
kamil f34d1bdd0f Avoid undefined behavior in left bit shift in jemalloc(3)
Change the type of shifted value to unsigned to prevent altering the
signedness bit.

jemalloc.c:1707:14, left shift of 1 by 31 places cannot be represented in type 'int'
jemalloc.c:1724:15, left shift of 1 by 31 places cannot be represented in type 'int'
jemalloc.c:1840:28, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-25 20:05:35 +00:00
ryo ac20698df5 fix a bug. no need postincrement here. 2018-07-20 12:19:07 +00:00
joerg 700ad9d05d Determine dynamic binaries by presence of PT_INTERP. Static PIE has
_DYNAMIC.
2018-07-13 19:50:21 +00:00
joerg bf395f73c9 Compute relocbase correctly for static PIE. AT_BASE is not usable in
this case.
2018-07-13 19:49:47 +00:00
maxv 62c8988166 Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.
2018-07-12 10:46:40 +00:00
christos 0dba751ea2 switch to FreeBSD's memmem 2018-07-08 17:53:42 +00:00
msaitoh 8402962f31 Indent. 2018-07-04 07:38:38 +00:00
dholland bc382992a0 Describe what this actually does. Bump date. 2018-06-25 01:21:21 +00:00
dholland d8a5b30306 atomic_and/atomic_or do bitwise ops, not logical ops. 2018-06-16 08:11:32 +00:00
eadler 8ddc25ac24 libc: remove explicit cast NULL in atoi
There isn't any reason to cast NULL so just remove it. A similar change
was already made in DragonFly and FreeBSD (by me).

ok fly@
2018-06-13 09:38:32 +00:00
maya 9616ec28db Avoid left-shifting a negative number in the non-compat case, too. 2018-06-11 20:28:23 +00:00
kamil 5a889623ce Correct Undefined Behavior in libc/citrus
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# nm /usr/lib/libc.so|grep sanit
/public/src.git/lib/libc/citrus/modules/citrus_mapper_std.c:173:8: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Sponsored by <The NetBSD Foundation>
2018-06-11 18:03:38 +00:00
christos 64715b9aa8 We can't build those three with MKSANITIZER, they are used too early. 2018-06-09 22:41:55 +00:00
joerg 5b49b507f5 Simplify to avoid pointless null pointer arithmetic. 2018-05-23 21:21:27 +00:00
wiz 1a15da2ec7 Use .An in authors section. Remove empty section. 2018-05-23 06:08:01 +00:00
christos e4acc50303 Add cross references to the openssl man pages. 2018-05-23 02:08:40 +00:00
wiz 69f43e6644 Remove reference to itself. 2018-05-22 05:39:44 +00:00
kamil 33e8159699 Minor improvement in sigaction(2)
Note that SIGCHLD covers process continued event.

Sponsored by <The NetBSD Foundation>
2018-05-22 03:07:50 +00:00
kamil fb80b4e61b Note in vfork(2) that SIGTSTP is masked
SIGSTOP is no longer masked, but it was never documented.

Sponsored by <The NetBSD Foundation>
2018-05-19 05:39:21 +00:00
joerg 33bc134aba Avoid complicated arithmetic involving NULL. 2018-05-16 20:21:39 +00:00
christos cfc8dcb49a Merge 2018e
Changes to code

    zic now accepts subsecond precision in expressions like
    00:19:32.13, which is approximately the legal time of the
    Netherlands from 1835 to 1937.  However, because it is
    questionable whether the few recorded uses of non-integer offsets
    had subsecond precision in practice, there are no plans for tzdata
    to use this feature.  (Thanks to Steve Allen for pointing out
    the limitations of historical data in this area.)

    The code is a bit more portable to MS-Windows.  Installers can
    compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that
    reserve identifiers like 'localtime'.  (Thanks to Manuela
    Friedrich).

  Changes to documentation and commentary

    theory.html now outlines tzdb's extensions to POSIX's model for
    civil time, and has a section "POSIX features no longer needed"
    that lists POSIX API components that are now vestigial.
    (From suggestions by Steve Summit.)  It also better distinguishes
    time zones from tz regions.  (From a suggestion by Guy Harris.)

    Commentary is now more consistent about using the phrase "daylight
    saving time", to match the C name tm_isdst.  Daylight saving time
    need not occur in summer, and need not have a positive offset from
    standard time.

    Commentary about historical transitions in Uruguay has been expanded
    with links to many relevant legal documents.
    (Thanks to Tim Parenti.)

    Commentary now uses some non-ASCII characters with Unicode value
    less than U+0100, as they can be useful and should work even with
    older editors such as XEmacs.
2018-05-04 15:51:00 +00:00
wiz b4c2969caa Sort sections. Sort ERRORS. Remove trailing whitespace. 2018-05-03 05:09:48 +00:00
christos 3e4df0d384 Explain PROT_MPROTECT better, add references to mremap(2), document the
unimplemented flags, documented the alignment pre-defined constants.
2018-05-02 16:00:20 +00:00
christos 652623d133 Add EXAMPLE and ERRORS section. 2018-05-02 15:25:13 +00:00
kamil 385d9c8955 Implement PTRACE_VFORK
Add support for tracing vfork(2) events in the context of ptrace(2).

This API covers other frontends to fork1(9) like posix_spawn(2) or clone(2),
if they cause parent to wait for exec(2) or exit(2) of the child.

Changes:
 - Add new argument to sigswitch() determining whether we need to acquire
   the proc_lock or whether it's already held.
 - Refactor fork1(9) for fork(2) and vfork(2)-like events.
   Call sigswitch() from fork(1) for forking or vforking parent, instead of
   emitting kpsignal(9). We need to emit the signal and suspend the parent,
   returning to user and relock proc_lock.
 - Add missing prototype for proc_stop_done() in kern_sig.c.
 - Make sigswitch a public function accessible from other kernel code
   including <sys/signalvar.h>.
 - Remove an entry about unimplemented PTRACE_VFORK in the ptrace(2) man page.
 - Permin PTRACE_VFORK in the ptrace(2) frontend for userland.
 - Remove expected failure for unimplemented PTRACE_VFORK tests in the ATF
   ptrace(2) test-suite.
 - Relax signal routing constraints under a debugger for a vfork(2)ed child.
   This intended to protect from signaling a parent of a vfork(2)ed child that
   called PT_TRACE_ME, but wrongly misrouted other signals in vfork(2)
   use-cases.

Add XXX comments about still existing problems and future enhancements:
 - correct vfork(2) + PT_TRACE_ME handling.
 - fork1(2) handling of scenarios when a process is collected in valid but
   rare cases.

All ATF ptrace(2) fork[1-8] and vfork[1-8] tests pass.

Fix PR kern/51630 by Kamil Rytarowski (myself).

Sponsored by <The NetBSD Foundation>
2018-05-01 16:37:23 +00:00
jmcneill e9bedda7d9 Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
2018-04-29 17:47:06 +00:00
dholland 40a6999954 note to get rid of statfs() when bump time comes 2018-04-06 17:03:59 +00:00
kamil 9ad30f3b4d Drop the USE_LIBTRE build option
libtre cannot be used any more as a replacement for regex(3).
Tt does not build and the library development is stalled in upstream.

Proposed on mailing list.

Sponsored by <The NetBSD Foundation>
2018-03-31 14:24:54 +00:00
roy 320ba6e2bf socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().

This allows userland to detect route(4) overflows so it can re-sync
with the current state.
2018-03-19 16:26:25 +00:00
kamil 570f001093 Remove PT_GET_SIGMASK / PT_SET_SIGMASK
These operations cloned Linux's specific PTRACE_GETSIGMASK / PTRACE_SETSIGMASK.
This feature was useful in applications like rr/criu/reptyr-like, where
the ptrace(2) interface is abused for the purpose of constructing an arbitrary
process. It's not reliable and not portable. For the NetBSD case it will be
better to invent something dedicated for serializing and deserializing a
process with threads.

Noted on tech-toolchain@ and blog entry

"LLDB restoration and return to ptrace(2)"
https://blog.netbsd.org/tnf/entry/lldb_restoration_and_return_to
2018-03-05 11:24:34 +00:00
lukem 287fdb86f8 PR/48585: Set errno when returning NULL for AF_INET
In inet_ntop4(), errno wasn't set before returning NULL.
Seems like an oversight in the existing fix for PR/48585.
Noticed by code inspection.
2018-03-02 06:31:53 +00:00
uwe ce9b54992a PIC code clobbers %r30 so we need to update the saved oucp with
caller's %r30 manually.  Makes old context happy when it needs to do
more function calls after restore.

(oops, forgot to commit this along with swapcontext.S)
2018-02-28 21:00:02 +00:00
uwe 8e33e1ffff PIC code clobbers %r30 so we need to update the saved oucp with
caller's %r30 manually.  Makes old context happy when it needs to do
more function calls after restore.
2018-02-28 20:51:58 +00:00
kamil 00e03d5b87 Document ragasub(3) & regnsub(3) implementation detail
Added note:
  Only 10 elements of the rm array can be used.

Sponsored by <The NetBSD Foundation>
2018-02-26 14:04:43 +00:00
pgoyette d831ae84a0 Remove extra "an"
Thanks to J. Lewis Muir
2018-02-22 08:33:43 +00:00
uwe ecb11c8936 Consistenly use "host byte order". 2018-02-21 14:11:09 +00:00
wiz c8f3c2c806 Fix endnetent prototype. Fix NULL. New sentence, new line. 2018-02-21 09:47:37 +00:00
kamil 01e8caecb0 Improve the getnetent(3) man-page
Document return type of setnetent(3) and endnetent(3). Both "void".

Sponsored by <The NetBSD Foundation>
2018-02-21 03:13:50 +00:00
uwe 9f4bd1d874 Markup "stdin". 2018-02-20 17:23:39 +00:00
uwe 250ec2c82f Make the list of STDBUF values and the list of mode values congruent
in formatting and spelling.
2018-02-20 17:21:11 +00:00
uwe e41e0b24d7 Use semantic markup. 2018-02-20 17:16:51 +00:00
wiz cb12e23020 Remove ineffective macros and arguments. 2018-02-20 09:36:26 +00:00
kamil 9776919255 Improve the setbuf(3) man-page
Move historical lines to newly added HISTORY section.
Additional historical notes obtained from OpenBSD.
2018-02-20 02:52:41 +00:00
christos 5a7f327f24 Enforce that getpeereid only returns success on AF_LOCAL sockets, instead
of returning garbage for other socket types.
2018-02-16 19:21:49 +00:00
jakllsch 3f96c239a8 Fix __siglongjmp14().
Fixes SIGINT causing ksh to "longjmp botch", presumably due to incorrect
magic number.
cvs: ----------------------------------------------------------------------
2018-02-12 22:31:04 +00:00
wiz 5742f479cd Remove useless macros. Sort errors. 2018-02-11 13:30:55 +00:00
wiz 7f7561e0c4 Remove useless macro. 2018-02-11 13:28:49 +00:00
wiz 220a072a26 Remove Tn. Remove trailing whitespace. Remove useless Pp. 2018-02-11 13:28:26 +00:00
pgoyette 2829446e9d Fix typos, as reported by Eitan Adler. Update dates. 2018-02-07 11:16:05 +00:00
martin eaf667a162 Bump date for previous 2018-02-07 09:59:56 +00:00
martin c778dbed18 Fix typo, from Eitan Adler. 2018-02-07 09:55:35 +00:00
mrg 4146fd94aa copy the i386 workaround for amd64. 2018-02-05 22:12:37 +00:00
skrll 239256a2b3 lower case 'ret' to avoid macro clash 2018-02-04 18:32:31 +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 cf47161082 Merge tzcode2018c [ changelog with changes to tzdata sections removed ]
Release 2018c - 2018-01-22 23:00:44 -0800

  Changes to build procedure

    The build procedure now works around mawk 1.3.3's lack of support
    for character class expressions.  (Problem reported by Ohyama.)


Release 2018b - 2018-01-17 23:24:48 -0800

  Changes to build procedure

    The distribution now contains the file 'pacificnew' again.
    This file was inadvertantly omitted in the 2018a distribution.
    (Problem reported by Matias Fonzo.)


Release 2018a - 2018-01-12 22:29:21 -0800

  Changes to build procedure

    The default installation locations have been changed to mostly
    match Debian circa 2017, instead of being designed as an add-on to
    4.3BSD circa 1986.  This affects the Makefile macros TOPDIR,
    TZDIR, MANDIR, and LIBDIR.  New Makefile macros TZDEFAULT, USRDIR,
    USRSHAREDIR, BINDIR, ZDUMPDIR, and ZICDIR let installers tailor
    locations more precisely.  (This responds to suggestions from
    Brian Inglis and from Steve Summit.)

    The default installation procedure no longer creates the
    backward-compatibility link US/Pacific-New, which causes
    confusion during user setup (e.g., see Debian bug 815200).
    Use 'make BACKWARD="backward pacificnew"' to create the link
    anyway, for now.  Eventually we plan to remove the link entirely.

    tzdata.zi now contains a version-number comment.
    (Suggested by Tom Lane.)

    The Makefile now quotes values like BACKWARD more carefully when
    passing them to the shell.  (Problem reported by Zefram.)

    Builders no longer need to specify -DHAVE_SNPRINTF on platforms
    that have snprintf and use pre-C99 compilers.  (Problem reported
    by Jon Skeet.)

  Changes to code

    zic has a new option -t FILE that specifies the location of the
    file that determines local time when TZ is unset.  The default for
    this location can be configured via the new TZDEFAULT makefile
    macro, which defaults to /etc/localtime.

    Diagnostics and commentary now distinguish UT from UTC more
    carefully; see theory.html for more information about UT vs UTC.

    zic has been ported to GCC 8's -Wstringop-truncation option.
    (Problem reported by Martin Sebor.)

  Changes to documentation and commentary

    The zic man page now documents the longstanding behavior that
    times and years can be out of the usual range, with negative times
    counting backwards from midnight and with year 0 preceding year 1.
    (Problem reported by Michael Deckers.)

    The theory.html file now mentions the POSIX limit of six chars
    per abbreviation, and lists alphabetic abbreviations used.

    The files tz-art.htm and tz-link.htm have been renamed to
    tz-art.html and tz-link.html, respectively, for consistency with
    other file names and to simplify web server configuration.
2018-01-25 22:48:42 +00:00
kamil 1bcc014257 Revert to commits as they broke few rump tests
"Include namespace.h in a few of libc source files
[...]
    This change finishes elimination of usage of the global name of the
    following symbols:
      - close -> _close
      - execve -> _execve
      - fcntl -> _fcntl
      - setcontext -> _setcontext
      - wait6 -> _wait6
      - write -> _write
      - writev -> _writev"

"Register more syscalls in namespace.h (of libc)

    Add weak symbols for:
     - fcntl
     - close
     - execve
     - setcontext
     - wait6
     - write
     - writev"

These changes broke:

    fs/nfs/t_rquotad:get_nfs_be_1_both
    fs/nfs/t_rquotad:get_nfs_be_1_group
    fs/nfs/t_rquotad:get_nfs_be_1_user
    fs/nfs/t_rquotad:get_nfs_le_1_both
    fs/nfs/t_rquotad:get_nfs_le_1_group
    fs/nfs/t_rquotad:get_nfs_le_1_user
    lib/librumphijack/t_config:fdoff
    lib/librumphijack/t_tcpip:http
    lib/librumphijack/t_tcpip:nfs
    lib/librumphijack/t_vfs:cpcopy
    lib/librumphijack/t_vfs:mv_x
    lib/librumphijack/t_vfs:paxcopy
    net/net/t_forwarding:ipforwarding_fastforward_v4
    net/net/t_forwarding:ipforwarding_fastforward_v6
    net/net/t_forwarding:ipforwarding_fragment_v4
    net/net/t_forwarding:ipforwarding_misc
    net/net/t_mtudisc6:mtudisc6_basic

This revert fixes the failures, except lib/librumphijack/t_vfs.

The original changes were added in order to facilitate a usage of
sanitizers against programs linked with NetBSD's libc. It is no longer
needed, so abandon these changes.

Sponsored by <The NetBSD Foundation>
2018-01-17 01:24:29 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
kamil 3e48d45743 Revert asctime() namespacing
asctime() is optionally a cancellation point in the POSIX spec.
It's not true for NetBSD.

Requested by <joerg>
2018-01-07 21:19:35 +00:00
kamil b4e223d109 Revert namespacing of atoi(3)
Sanitizers can handle recursive interceptions in some / most cases, if they
will cause damage the problem will be not workaroundable without libc
changes - I will be back to it.

Keep namespace of asctime() as this can be a cancellation point according
to POSIX. Right now it's not implemented on NetBSD. Defer it for later.

Keep weak symbols and namespace for wait6(2) as this could be a
cancellation point as well. Defer this for later.

Sanitizers's [recursive] interceptors are a hack and moving one way or
another can cause new sets of problems. Recursive ones can be useful and
cause problems (on Linux there are known with with signal handlers).

Sponsored by <The NetBSD Foundation>
2018-01-07 15:28:33 +00:00
snj 9d37d7200a add strfmon_l man page links 2018-01-05 20:51:13 +00:00
kamil 763ed9e584 Register new weak symbol in libc for internal usage: atoi
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

Add atoi to namespace.h.

Register a new __weak_alias() entry for atoi() in atoi.c.

atoi() is used internally in getrpcent(), rresvport_af(), ftok(), err(),
__llvm_profile_write_file(), llvm_gcda_start_file(), citrus_iconv_open(),
getprotoent_r(), __rpc_uaddr2taddr_af(), __res_nopt_rdata() and
servent_parseline().

This revision switches the internal usage to the internal symbol.

Sponsored by <The NetBSD Foundation>
2018-01-05 20:30:51 +00:00
kamil 947899dacf Register new weak symbol in libc for internal usage: asctime
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

Add asctime to namespace.h.

Register a new __weak_alias() entry for asctime() in asctime.c.

acstime() is used internally in ctime and __ctime50. This revision switches
the internal usage to the internal symbol.

Sponsored by <The NetBSD Foundation>
2018-01-05 20:01:31 +00:00
kamil 17a7df3a53 Register dl_iterate_phdr in the libc's namespace.h
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

Stop using the public global name of dl_iterate_phdr in tls/tls.c:
__libc_static_tls_setup().

Follow the approach with other dlopen(3)-like functions with the
namespace.h in the dl_iterate_phdr() case. Use internally a weak symbol:
__dl_iterate_phdr instead of dl_iterate_phdr.

Sponsored by <The NetBSD Foundation>
2018-01-05 19:29:44 +00:00
kamil 575eeceb5d Include namespace.h in a few of libc source files
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change finishes elimination of usage of the global name of the
following symbols:
  - close -> _close
  - execve -> _execve
  - fcntl -> _fcntl
  - setcontext -> _setcontext
  - wait6 -> _wait6
  - write -> _write
  - writev -> _writev

Sponsored by <The NetBSD Foundation>
2018-01-05 19:01:36 +00:00
kamil 9b020cc558 Register more syscalls in namespace.h (of libc)
Add weak symbols for:
 - fcntl
 - close
 - execve
 - setcontext
 - wait6
 - write
 - writev

These syscalls are already marked as WEAKASM, generating weak references.

Sponsored by <The NetBSD Foundation>
2018-01-05 18:57:06 +00:00
kamil 5236f0d558 Include namespace.h in citrus/citrus_lc_ctype.c
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global name of the following symbol:
  - strlcpy -> _strlcpy

Sponsored by <The NetBSD Foundation>
2018-01-05 17:52:06 +00:00
kamil c5b83981a9 Add bunch of missing includes of namespace.h in libc
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
 - strlcat -> _strlcat
 - sysconf -> __sysconf
 - closedir -> _closedir
 - fparseln -> _fparseln
 - kill -> _kill
 - mkstemp -> _mkstemp
 - reallocarr -> _reallocarr
 - strcasecmp -> _strcasecmp
 - strncasecmp -> _strncasecmp
 - strptime -> _strptime
 - strtok_r -> _strtok_r
 - sysctl -> _sysctl
 - dlopen -> __dlopen
 - dlclose -> __dlclose
 - dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>
2018-01-04 20:57:28 +00:00
dholland 9f8d4ee3ee Fix plurals. 2017-12-31 07:22:55 +00:00
christos 6964f5bd48 PR/52837: Michael Kaufmann: getaddrinfo() resolves "127.0.0.1 www.example.com"
to 127.0.0.1. Apply the patch from FreeBSD and explain the rationale.
2017-12-28 15:12:15 +00:00
christos 09f3fd36e9 use __USE() 2017-12-26 17:09:20 +00:00
christos 6ee2d92011 Fix const argument inconsistency (found by lint(1)) 2017-12-26 17:01:25 +00:00
maya 7587a6b792 Match prior syscall behaviour
hide __RCSID under the same macros as rest of libc
2017-12-26 05:45:50 +00:00
kamil daf244781b libc: Add a dummy implementation of vadvise()
This readds a symbol that has been removed accidentally without major bump.

The implementation is dummy (similar to the old one), without API in public
headers.

Pointed out by <maya>

Sponsored by <The NetBSD Foundation>
2017-12-25 11:03:30 +00:00
kamil 8a69d50880 Deregister vadvise.S from lib/libc/sys/Makefile.inc
Such file was never registered since the inception of NetBSD.
The (o)vadvise is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
2017-12-19 18:43:42 +00:00
christos f2d2b20d38 PR/52826: Onno van der Linden: Return PRI_NONE for sched_get_priority_m{in,ax}
and SCHED_OTHER.
2017-12-16 18:31:36 +00:00
rin fd569112f9 Revert change made by rev 1.11; now, fmtcheck(3) does not complain about
unused trailing arguments as before.

See also discussion on tech-userland:
http://mail-index.netbsd.org/tech-userlevel/2017/12/07/msg011019.html
2017-12-13 06:43:45 +00:00
abhinav b2e12d0489 Add ctype to the NAME section (as this is a man page for ctype)
Remove rest of the names from the NAME section
(These names have their own individual man pages, as such it doesn't make sense
 to have their names in the NAME section in this man page as well. Moreover,
 we have been trying to fix such man pages so that apropos(1)/whatis(1) are
 able to search these man pages. Other examples of such fixed man pages include
 memory(3), string(3) etc.)

ok wiz@
2017-12-12 14:13:52 +00:00
christos 87ad8af409 PR/52801: Kamil Rytarowski: Add missing weak aliases for wcsto{f,d,ld}_l
XXX: pullup-8
2017-12-09 22:48:00 +00:00
wiz dbc6984550 Remove trailing whitespace. 2017-12-08 09:14:36 +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
kre 7fec48294c Fix obvious typo (cut&pasto or whatever) - there's only one value that
specifies the number of digits after the decimal point (oh, sorry, the
"radix character") the other specifies the number before...

While here, add a little more info on the effects of using the #n value.
2017-12-07 22:19:17 +00:00
dholland 6dc0f13680 The list of async-signal-safe functions got moved to sigaction(2). 2017-12-06 16:38:22 +00:00
rin d2b4f0d1a5 Fix possible use of uninitialized variable in case of WIN32 && !_WIN64. 2017-12-06 14:05:14 +00:00
rin c084bfdff8 Teach fmtcheck(3) about wint_t, intmax_t, char *, intmax_t *, and wide string
arguments. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev181154
2017-12-06 12:32:02 +00:00
rin 41130f53d9 Teach fmtcheck(3) about the ' (thousands separator) flag. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev143905
2017-12-06 12:30:27 +00:00
rin efd7892a37 Teach fmtcheck(3) about the flags a, A, F, G, t, and z. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev117014
2017-12-06 12:28:53 +00:00
rin 75399b3dca Correct oversight of wrong format string with fewer number of arguments than
default format string has.
2017-12-06 11:33:34 +00:00
mrg be18dbc420 normalise some indentation. NFC. 2017-12-01 22:47:06 +00:00
wiz 2daf92edc4 Add riastradh's man pages for sha3 and friends.
Commented out since the symbols themselves are not yet public.
2017-11-30 16:00:48 +00:00
riastradh 969998948d Import SHA-3 code into libc and libkern.
No new public symbols in libc, but publishing the symbols is a simple
matter if/when we decide to do so.

Proposed on tech-kern and tech-userlevel with no objections:

https://mail-index.NetBSD.org/tech-kern/2017/11/11/msg022581.html
https://mail-index.NetBSD.org/tech-userlevel/2017/11/11/msg010968.html
2017-11-30 05:47:24 +00:00
ryo 1ee7b8d05d fix to work
* no need to check x29 != NULL. fp may be NULL.
* don't break in-use register x5.
2017-11-28 13:09:05 +00:00
ryo 2b1e7d7ebc KNF. use tab 2017-11-28 09:06:25 +00:00
maya a1f7eefb77 use calloc rather than malloc + memset 0 2017-11-27 23:54:28 +00:00
christos 91729e7f3d Fix various bugs with strfmon:
- Avoid out of bounds access for the currency_symbol[3] when the symbol
  is shorter (as it happens with the C locale where it is empty)
- Don't compare pointers to NUL, it is not helpful.
- Make the default sep_by_space 1 as suggested in:
      https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_node/libc_111.html
- Use the correct number of bytes for memmove(3)

XXX: pullup-8
2017-11-27 22:43:07 +00:00
christos 2817b6ef18 Use 16x instead of 4x the amount of space since each wint_t can result in
4 bytes of 4 characters ("\ooo") each.
2017-11-27 16:37:21 +00:00
uwe 8a5ddfccec .Xr makedev 3 2017-11-20 17:03:31 +00:00
skrll f9ef5aa297 The HPPA architectures (1.1 and 2.0) both define quadruple-word (128-bit)
floating point types.  Adjust alignment to match.
2017-11-16 13:54:00 +00:00
wiz 5b65709e5e Remove Tn. 2017-11-13 09:04:57 +00:00
alnsn 5486dd5a65 Use a more efficient data structure for graph peeling.
New code is about 50% faster on amd64 and it consumes less memory.
2017-11-11 18:05:31 +00:00
christos 9b7a6414b8 Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.
2017-11-09 20:30:01 +00:00
joerg 27ef7ea778 Assert that __cxa_atexit is not used with NULL as DSO. Don't use
__cxa_atexit directly from atexit, they have different behavior.
2017-11-06 14:26:03 +00:00
kre 6c755bb23a Be more consistent with how we refer to fopen() - pointed out by wiz@ 2017-11-04 08:53:23 +00:00
kre 1a3a8b3401 Some (mostly minor) wording improvements (IMO) 2017-11-04 08:04:40 +00:00
wiz 0858eb46a4 Fix xref. Remove Tn. 2017-11-04 07:59:17 +00:00
kre 1593016b98 Avoid losing a fd (ie: close it) in the (ever so likely) case that the
fd exceeds the limits of what can be stored in a FILE (65535).
2017-11-04 07:26:35 +00:00
christos b4e5b9fac2 Implement nofollow (l) for fopen(3). 2017-11-04 02:49:55 +00:00
kamil 3720ea4f1f Revert previous on demand.
Rationale:

The DSO handle is a required part of the (external) __cxa_atexit interface.
The atexit mapping is an implementation detail and not part of the public
interface. Doing it directly creates UB as it involves casting function
pointers between incompatible types.

  -- Joerg
2017-11-02 19:39:33 +00:00
kamil 5919a1817c Correct handling of __cxa_atexit(a,b,NULL) in libc
In the NetBSD implementation and suggested by Itanium C++ ABI, we wrap
the atexit(x) call as __cxa_atexit(x,NULL,NULL).

__cxa_atexit() is an internal function for the usage of C++.

Correct a bug that __cxa_atexit(x,y,NULL) is handled in the same way as
atexit(x) (which is simplified to __cxa_atexit(x,NULL,NULL).

This misbehavior has been detected in the Thread Sanitizer port to NetBSD.

Patch reviewed by <christos>

Sponsored by <The NetBSD Foundation>
2017-11-02 18:37:14 +00:00
wiz a853e07e30 Remove Tn 2017-10-30 15:49:24 +00:00
wiz 5ab4936e8f Sort errors. 2017-10-30 15:48:38 +00:00
wiz 918f9ea9bf Fix Bl argument. 2017-10-30 15:46:38 +00:00
wiz e347d4a2bc Remove Tn. Do not split on An lines. 2017-10-30 15:44:29 +00:00
wiz 356694b084 Remove empty Fd. Use minus for return value. End list. Sort SEE ALSO. 2017-10-30 15:43:21 +00:00
abhinav 0754fa7ebe Fix the escape used for em dash
ok wiz@
2017-10-29 06:07:48 +00:00
kre 2f85c3d4cc Replace a line that somehow got lost in the import from tzcode2017c 2017-10-27 08:43:11 +00:00
kre 3febc0010c Minor typo: Coordinated Universal time should be Coordinated Universal Time 2017-10-27 04:05:21 +00:00
abhinav d63fc20b95 Remove comma after last Nm entry
Remove whitespace at the end of a line
2017-10-25 19:04:07 +00:00
abhinav 51a8d8a0b4 Add offtime_r to the NAME section 2017-10-25 19:01:25 +00:00
abhinav c8a396a132 Add clock_getcpuclockid to the NAME section 2017-10-25 17:59:34 +00:00
abhinav 545049196d Correct the standard version for clock_nanosleep (based on the FreeBSD man page) 2017-10-25 17:58:04 +00:00
abhinav 9a76ef5605 Add clock_nanosleep to the NAME section 2017-10-25 17:53:11 +00:00
abhinav 0155ea64e5 Add pipe2 to the NAME section 2017-10-25 17:44:50 +00:00
abhinav 601784ba0d Add sigqueueinfo to the NAME section 2017-10-25 17:42:05 +00:00
abhinav 30ceea90de Add FD_SET, FD_CLR, FD_ISSET and FD_ZERO to the NAME section 2017-10-25 17:39:47 +00:00
abhinav 2c753d95a2 Add fktrace to the NAME section 2017-10-25 17:30:03 +00:00
abhinav 48aa2c5579 Add fhstatvfs1 to the NAME section 2017-10-25 17:25:52 +00:00
abhinav 5276cf1c4f Add fchroot to the NAME section 2017-10-25 17:20:52 +00:00
abhinav 3996dac127 Add malloc.conf to the NAME section
Remove Pp before Bd at few places
2017-10-25 17:09:47 +00:00
abhinav c4a4501400 Remove comma after last Nm entry 2017-10-25 17:03:30 +00:00
abhinav 12893f5e2d Add __svc_getcallercreds to the NAME section
Remove Pp before It at various places
2017-10-25 16:49:24 +00:00
abhinav 618595eef6 Add freeifaddrs to the NAME section 2017-10-25 16:29:20 +00:00
abhinav 6640ff4e35 Remove comma after last Nm entry 2017-10-25 16:26:42 +00:00
abhinav 00e05bcfbf Remove comma after last Nm entry.
New sentence, new line
2017-10-25 16:13:04 +00:00
abhinav fc4633c657 Add towupper to the NAME section as well. 2017-10-25 16:07:34 +00:00
abhinav 2152f063ba Add sha_224, sha_384 and sha_512 family of functions to the NAME section as well.
Also use .An for authors in the AUTHORS section
2017-10-25 16:04:00 +00:00
kre 673e27def2 Implement tcgetwinsize() and tcsetwinsize() in libc, with access
via <termios.h> (and document them.)   Bump libc minor number for them.

Arrange for "struct winsize" to become visible in <termios.h>

Fix stty(1) so that "cols" is reported as the arg to set number of columns,
and "columns" is the alias, rather than the other way around, as "cols" is
what has been added to POSIX.

This is to conform with updates to be included in 1003.1 issue 8
(whenever that gets published) currently available at:
  http://austingroupbugs.net/view.php?id=1053   (see note 3863)
  http://austingroupbugs.net/view.php?id=1151   (see note 3856)
2017-10-25 06:32:59 +00:00
abhinav 99c134c1ef Add missing functions from the SYNOPSIS to the NAME section 2017-10-24 19:14:55 +00:00
abhinav 64d5a81edc Use commas at the right places in the NAME section 2017-10-24 19:07:12 +00:00
abhinav e4ba874d49 Add missing functions from the SYNOPSIS to the NAME section 2017-10-24 19:04:58 +00:00
abhinav 6180428e00 Remove trailing comma after last Nm entry in the NAME section 2017-10-24 18:54:03 +00:00
abhinav 878bf2901f Add getpass_r and getpassfd to the NAME section as well. 2017-10-24 18:50:46 +00:00
abhinav fb69a07bd7 Fix typo: s/cexpandtc/csetexpandtc
The synopsis and description mention only csetexpandtc function.
nxr also only shows csetexpandtc while no matches for cexpandtc.
2017-10-24 18:42:06 +00:00
abhinav f71ab63ff2 Add membar_datadep_consumer to the NAME section
Remove Pp before Bl
2017-10-24 18:19:17 +00:00
christos 5f2f4c606d Welcome to 2017c:
zic and the reference runtime now reject multiple leap seconds
    within 28 days of each other, or leap seconds before the Epoch.
    As a result, support for double leap seconds, which was
    obsolescent and undocumented, has been removed.  Double leap
    seconds were an error in the C89 standard; they have never existed
    in civil timekeeping.  (Thanks to Robert Elz and Bradley White for
    noticing glitches in the code that uncovered this problem.)

    zic now warns about use of the obsolescent and undocumented -y
    option, and about use of the obsolescent TYPE field of Rule lines.

    zic now allows unambiguous abbreviations like "Sa" and "Su" for
    weekdays; formerly it rejected them due to a bug.  Conversely, zic
    no longer considers non-prefixes to be abbreviations; for example,
    it no longer accepts "lF" as an abbreviation for "lastFriday".
    Also, zic warns about the undocumented usage with a "last-"
    prefix, e.g., "last-Fri".

    Similarly, zic now accepts the unambiguous abbreviation "L" for
    "Link" in ordinary context and for "Leap" in leap-second context.
    Conversely, zic no longer accepts non-prefixes such as "La" as
    abbreviations for words like "Leap".

    zic no longer accepts leap second lines in ordinary input, or
    ordinary lines in leap second input.  Formerly, zic sometimes
    warned about this undocumented usage and handled it incorrectly.

    The new macro HAVE_TZNAME governs whether the tzname external
    variable is exported, instead of USG_COMPAT.  USG_COMPAT now
    governs only the external variables "timezone" and "daylight".
    This change is needed because the three variables are not in the
    same category: although POSIX requires tzname, it specifies the
    other two variables as optional.  Also, USG_COMPAT is now 1 or 0:
    if not defined, the code attempts to guess it from other macros.

    localtime.c and difftime.c no longer require stdio.h, and .c files
    other than zic.c no longer require sys/wait.h.

    zdump.c no longer assumes snprintf.  (Reported by Jonathan Leffler.)

    Calculation of time_t extrema works around a bug in GCC 4.8.4
    (Reported by Stan Shebs and Joseph Myers.)

    zic.c no longer mistranslates formats of line numbers in non-English
    locales.  (Problem reported by Benno Schulenberg.)

    Several minor changes have been made to the code to make it a
    bit easier to port to MS-Windows and Solaris.  (Thanks to Kees
    Dekker for reporting the problems.)

  Changes to documentation and commentary

    The two new files 'theory.html' and 'calendars' contain the
    contents of the removed file 'Theory'.  The goal is to document
    tzdb theory more accessibly.

    The zic man page now documents abbreviation rules.

    tz-link.htm now covers how to apply tzdata changes to clients.
    (Thanks to Jorge Fábregas for the AIX link.)  It also mentions MySQL.

    The leap-seconds.list URL has been updated to something that is
    more reliable for tzdb.  (Thanks to Tim Parenti and Brian Inglis.)
2017-10-24 17:38:17 +00:00
abhinav c5bdcaa078 Remove cdbr_write from NAME section, it's a left over
Also add comma after the first Nm entry

ok joerg@
2017-10-24 17:01:15 +00:00
riastradh 978d650e25 xref libc/README 2017-10-22 01:57:33 +00:00
christos 0ed7676d2f Add an explanation of how namespace.h works. 2017-10-22 00:20:50 +00:00
ryo a3bfd3d76c return 0xffffffffffffffff (= -1). not 0x00000000ffffffff. 2017-10-12 05:51:51 +00:00
christos 96a83291ba remove recallocarray 2017-10-07 21:15:48 +00:00
christos b7ac88e3e2 add recallocarray 2017-10-07 19:38:35 +00:00
roy b481130756 Cast away some compile warnings. 2017-10-05 09:59:04 +00:00
dholland e4fcba91cd One of the things we should do when bumping libc is to boot the
obsolete cryptographic hashes out of libc, either entirely or to
some "insecure" library.
2017-10-05 04:38:08 +00:00
christos 97aca01504 PR/52578: Benjamin M. Schwartz: sync the internal copy of res_nquery for
getaddrinfo, with the real version so that we handle EDNS fallback.
2017-09-29 00:04:33 +00:00
christos 5e3f85208a PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is enabled
(RFC 6840 Section 5.7).
2017-09-28 23:32:01 +00:00
maya 072aa72f29 move VAX notes to CAVEATS, clarify. 2017-09-27 18:55:50 +00:00
maya 88374bbe62 Move VAX notes to CAVEATS, clarify that it just returns zero
The VAX isinf implementation is in sys/arch/vax/include/math.h.
2017-09-27 09:04:30 +00:00
wiz cf8f895d5c Remove superfluous Tn. 2017-09-18 08:48:23 +00:00
abhinav 4d2c8c35f1 Add execlpe and execvpe to the NAME section 2017-09-17 11:45:10 +00:00
wiz 33c74a490b Fix typo. 2017-09-10 10:12:43 +00:00
wiz 3a20565680 Sort sections. Make error descriptions complete sentences. 2017-09-10 10:12:21 +00:00
kre 9a7908da70 Fix a typo, and some wording improvements. 2017-09-10 00:49:40 +00:00
kamil cb1261ae47 Remove the BUGS section from devname(3)
devname(3) does not report type of error on purpose.

Suggested by <kre>
2017-09-09 18:45:04 +00:00
kamil d4fa9170e4 Install new man-page devname_r(3).
This is a link to devname(3).
2017-09-09 18:18:27 +00:00
kamil aeb1b62621 Document devname_r(3) in devname(3).
Improve clarity of devname(3) mentioning that it returns a pointer to the
buffer pointer. This approach is not thread-safe and not reentrant.

Not that devname(3) does not set errno on failure and document it as a bug.
2017-09-09 18:00:39 +00:00
kamil 043717d197 Correct the documentatin of ptsname_r(3)
This function returns "int" not "char *": errno on failure, 0 on success.
2017-09-09 12:28:19 +00:00
ginsbach 8f3f249e43 The military/nautical time zones were added following RFC 822 and RFC
2822 specifications.  Unfortunately they are specified incorrectly in
RFC-822 and not very clearly in RFC 2822. RFC 1123 clearly states they
are specified incorrectly - counting the wrong way from UTC - in RFC
822.  RFC 2822 just states they were implemented in a non-standard way.
Mea culpa for not noticing when originally implemented.  Fix them so
the correct calculations are made.
2017-08-24 01:01:09 +00:00
christos 78a5d7f273 PR/52499: Justin: stresep uses memmove with of-by-one length 2017-08-23 10:27:41 +00:00
joerg 78529fd592 Bump libc minor to 208 for strfmon_l. 2017-08-16 21:32:22 +00:00
wiz 3384507177 Typo fix. 2017-08-16 17:41:36 +00:00
joerg 29f5b623d9 Add missing strfmon_l. Noticed by Bruno Haible. Add test case. 2017-08-16 13:53:19 +00:00
ginsbach 626fa0a1b6 PR lib/15802: Shuuichirou Murata: Add missing xdr_rpcbs_rmtcalllist_ptr
There was a missing call to xdr_rpcbs_rmtcalllist_ptr in xdr_rpcb_stat.
This fixes issues with RPCBPROC_GETSTAT not working correctly with
systems that correctly implement the XDR encode/decode routine.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
2017-08-13 01:08:41 +00:00
ginsbach e5907619c8 Fix a couple comments and a spacing nit.
- Change a XXX comment that no longer applies.
- Add a clarifying comment.
2017-08-12 03:29:23 +00:00
ginsbach bc29482829 PR lib/50316: Gracefully handle a zero number of members argument.
Taken from FreeBSD (which fixed this same issue long ago).

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
2017-08-12 01:10:04 +00:00
wiz b7a4e7c758 Remove superfluous Pp. 2017-08-05 20:22:29 +00:00
ginsbach 2c7d87026b There are more than four types of encoding. The combination of
VIS_CSTYLE | VIS_OCTAL is different from either separately.
2017-08-04 01:06:22 +00:00
wiz 5c03888027 Bump date for previous. 2017-07-30 23:13:24 +00:00
cheusov 06a8adc44a According to POSIX return value of fputs(3) should be a non-netagive value if it succeeds 2017-07-30 22:53:56 +00:00
martin 53f08c908d Do not use IEEE 754 specific functions for VAX 2017-07-23 09:50:54 +00:00
joerg 6138a69002 Drop TLS variant checks, emutls is enough for VAX and Sun2. 2017-07-14 19:24:52 +00:00
joerg 9c8895ecbf Avoid common declaration. 2017-07-14 19:24:12 +00:00
christos 2658452278 s == NULL is illegal. 2017-07-13 16:00:30 +00:00
joerg a2027e8500 Redo previous: catch NULL pointer earlier, check for empty string
latter.
2017-07-13 15:46:26 +00:00
joerg fc68490ed6 Spell NULL correctly. 2017-07-13 15:44:45 +00:00
perseant b22c29c1cc A more correct fix for PR standards/52282. 2017-07-11 19:36:38 +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
perseant 9648a4c226 Do not use thousands grouping when none is specified by the locale.
Fixes PR standards/52282.
2017-07-10 22:49:40 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos b48a2efd04 Revert previous since it causes a double free (p->nc_netid == tmp == tmp2).
From Xin Li @ FreeBSD.
XXX: pullup 7
2017-06-30 10:03:34 +00:00
manu f9489ea006 Include IPv6 global variable in USE_INET6=no libc
This ensures a binary built with USE_INET6=yes libc can still link at
runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not
available, but dynamic linking is not killed by missing symbols such
as in6addr_any.
2017-06-18 04:03:44 +00:00
manu 6a05c304af Make shared -DSMALL libc buildable without breaking libhack
We used -DSMALL to exclude code from libc in order to build
libhack. Introduce -DLIBHACK to do this without so that
-DSMALL does not remove code necessary for building a shared libc
2017-06-18 03:56:39 +00:00
joerg 54eae2a123 PR 51654: Don't initialize _dlauxinfo for static binaries.
Emacs likes save all memory of the main binary and the first run of
_libc_init via .init will get the wrong (old) value of __ps_strings.
By avoiding the initialization of _dlauxinfo for shared applications,
it will be touched only by the _libc_init call from crt0.o itself,
at which point __ps_strings is correct.
2017-06-17 15:26:44 +00:00
abhinav 9cda1315ff Remove names from the NAME section which have their own man pages.
This is similar to the changes made in string(3) and memory(3) man pages previously.

The reasin being that, when you do `whatis ffs', an extra entry will be there in
the output for this page, which is confusing and unncessary.

Bump date for changes in the NAME section.
2017-06-17 10:48:09 +00:00
joerg 0cc4289645 Implement __clear_cache using __syncicache on PPC 2017-06-16 21:22:14 +00:00
abhinav 1c893641af Fix typo
Insert Pp after a list to add vertical space before the next paragraph
Remove Pp before Bl at two places
2017-06-12 14:59:04 +00:00
abhinav 7c1ea70c7f Grammar and punctuation fixes in few sentences
Remove Pp before Bd at couple of places
2017-06-11 17:34:54 +00:00
abhinav 8ef406c2e9 Insert missing word
Insert comma in a sentence to make the comprehension easier
Remove Pp before Bd
2017-06-11 17:01:26 +00:00
joerg c382407551 Add two entries for interaction between lib/csu and libc. 2017-06-08 18:27:05 +00:00
uwe 555c77845c Don't use "NULL" to talk about null-terminated strings.
The C standard seems to be inconsistent about dash vs. space.  Old
text uses dash, Annex K uses space.  I'll let wizd(8) to sort that
out.
2017-06-08 15:59:45 +00:00
joerg cf3055c7a2 One more hack to kill in setproctitle 2017-06-08 13:32:20 +00:00
kamil da61917c5f EV_SET(2) - simplify description
Note only the information that it does not evaluate multiple times its
parameters.

Suggested by <wiz>.
2017-06-07 20:54:59 +00:00
abhinav 46dffe54d1 s/filesystem/file system/
Thanks to Thomas for pointing out that in NetBSD man pages we try to use the convention of writing it
as "file system".
2017-06-07 05:26:19 +00:00
abhinav 1a8ce3a63b Bump date for previous
Fix typo: fileystem -> filesystem
2017-06-06 20:12:54 +00:00
kamil bc0c5fd82b Update the EV_SET() description with newer implementation.
EV_SET(2) is a macro again, that wraps an inline function which is still
new in NetBSD 8.0.

Sponsored by <The NetBSD Foundation>
2017-06-06 17:01:59 +00:00
abhinav c45058c218 Fix typo: s/interrput/interrupt/ 2017-06-03 19:41:14 +00:00
kamil 5f91e65caa Document transition of EV_SET() from a macro to a static inline function
Sponsored by <The NetBSD Foundation>
2017-05-31 01:03:01 +00:00
bouyer 6e4cb2b9ab merge the bouyer-socketcan branch to HEAD.
CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
2017-05-27 21:02:54 +00:00
joerg 5bdaea99ff Use MACHINE_ARCH for the sparc check. 2017-05-26 22:56:50 +00:00
joerg 0ad2a3f96d Add __clear_cache implementatin for SPARC/SPARC64. 2017-05-24 21:45:40 +00:00
christos 3ccc6b27b8 remove accidental __strong_alias additions, noticed by coypu. 2017-05-19 19:55:16 +00:00
christos 0a20cdb1cf use strerror_r_ss() 2017-05-19 19:51:10 +00:00
christos 1997642fee The BSD qsort() performs tail recursion elimination on the second
side of the array being partitioned to save on stack space.  Greater
savings can be gained by choosing recursion for the smaller side
of the partition and eliminating recursion for the larger side.
This also results in a small but measurable performance gain.
(From OpenBSD)
2017-05-19 19:48:19 +00:00
christos eeb345227e Don't make assert use stdio; saves >100K on an empty static binary. 2017-05-15 16:09:09 +00:00
wiz 0456c39519 Formatting and punctuation improvements. 2017-05-14 12:35:46 +00:00
wiz 63d3c713fa file system police. 2017-05-14 12:30:37 +00:00
wiz cf1b0d459d Use Nx. 2017-05-14 12:29:10 +00:00
kre 7cbdd94285 Turns out that the previous fix is incorrect, we were not doing ++hit
to change the boolean hit from false to true, but to change it from 1 to 2
which in a sense should have been obvious from the context:
	if (hit)
		/* more tests */
			++hit;
The real problem was that hit was (in the imported tzcode) incorrectly
changed from int to bool in a previous update.

Not that it matters, this code is never actually executed - it was there
to deal with the mythical double leapseconds, which simply never exist
(hit counted the number of leapseconds in an adjustment) and it will all
be gone in the next tzcode update.

For now, just turn hit back into an int, which should satisfy gcc 8,
I hope.
2017-05-10 10:34:30 +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
abhinav d531aa96de Add missing word. 2017-05-09 06:41:56 +00:00
maya 9c26aa2ea4 Avoid shift of negative signed integer. this is UB. NFC.
from gcc8, ok riastradh
2017-05-09 02:56:44 +00:00
maya 6db625eb59 ++bool to bool=true to appease GCC 8. NFC
ok riastradh
2017-05-09 02:30:49 +00:00
christos 048b91431b use the symbolic M_ALL and trim with M_MASK 2017-05-08 14:42:16 +00:00
joerg 4f77b889d0 Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
2017-05-06 21:34:51 +00:00
christos 1700326566 - limit size of buffers to RPC_MAXDATASIZE
- don't leak memory
- be more picky about bad parameters
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt

XXX: pullup-7
2017-05-03 21:39:27 +00:00
christos b8fc685b9a Switch from a recursive pattern matching algorithm to handle '*'
to a backtracking one. Avoids DoS attacks with patterns "a*a*a*a*a*...b"
matching against "aaaaaaaaaaaa..." https://research.swtch.com/glob
2017-04-26 14:56:54 +00:00
abhinav 06ea77a20c Clean up the NAME section.
The entries in the NAME section of these man pages have man pages of their
own, so it doesn't make sense to have their names here, instead they
should be just described in the body (similar to what we do in math(3) man page).

This also helps whatis(1) and apropos(1), as otherwise you would see multiple
results with the same name in the output, while there is actually only one page
with that name.

Good example is:

$ apropos -n 2 -M realloc
realloc (3)       general memory allocation operations
realloc (3)       general purpose memory allocation functions

The first line is there because memory(3) man page had realloc in its
NAME section. This commit will fix this issue.

ok wiz@
2017-04-26 07:40:09 +00:00
christos 1e4359e82a merge tzcode2017b. 2017-04-25 13:19:44 +00:00