Commit Graph

19110 Commits

Author SHA1 Message Date
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
abhinav 8756784cea Remove duplicate MLINK entry for dup_field.3
(it's already defined 3 lines above)
2017-10-23 15:34:45 +00:00
abhinav 73341ac74a Add the function names to the NAME section 2017-10-23 15:23:55 +00:00
ozaki-r a9b3bb4d56 Provide better debug messages for ioctl 2017-10-23 06:52:17 +00:00
wiz 3faa539e67 Sort errors. 2017-10-23 01:05:10 +00:00
wiz 661e3b5159 Remove superfluous Tn. 2017-10-23 01:03:23 +00:00
abhinav d06479fa8d All the four functions described in the man page conform to POSIX.1 2017-10-22 18:37:01 +00:00
abhinav 3a2c8ba99e Add missing word in the sentence 2017-10-22 18:26:46 +00:00
abhinav 75bd3393d3 Add snprintb_m to the NAME section. 2017-10-22 16:59:18 +00:00
abhinav d4ec480093 Add missing functions to the NAME section 2017-10-22 16:55:32 +00:00
abhinav 1cfbd11bb0 Add hid_parse_usage_page and hid_parse_usage_in_page to the NAME section 2017-10-22 16:49:13 +00:00
abhinav 69d19b9c6c Remove tputs from NAME section since it is described in terminfo(3) 2017-10-22 16:44:51 +00:00
abhinav 6c258b9750 Add missing functions to the NAME section 2017-10-22 16:42:34 +00:00
abhinav 3e5ec8a33f Add missing function names in the NAME section for rest of the man pages in libpthread 2017-10-22 16:37:24 +00:00
abhinav 3aabdfe0ee Remove description of pthread_barrierattr_getpshared and pthread_barrierattr_setpshared
These functions are described in pthread_barrierattr(3) man page
2017-10-22 16:15:02 +00:00
abhinav 3db8282e27 Add rest of the pthread_barrier functions in the NAME section 2017-10-22 16:09:22 +00:00
abhinav 73a3e7fa13 Add pthread_attr_setdetachstate to NAME section 2017-10-22 15:48:11 +00:00
abhinav ccdb3ad6e1 Add pthread_getattr_np to the NAME section 2017-10-22 15:44:21 +00:00
abhinav 73531600cc Add function names to the NAME section 2017-10-22 15:28:48 +00:00
abhinav fb3eb352ca Add rest of the functions from the SYNOPSIS to the NAME section 2017-10-22 14:25:33 +00:00
abhinav ee4c697d62 Add rest of the functions from the SYNOPSIS section to the NAME section 2017-10-22 14:07:03 +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
abhinav 92a9b5c3ba Add copyright and rcs header to the test program.
Also, remove a test case which was not supposed to be there.
(While that test case works with the changes I committed, testing that
 test case with the test program is not possible in its current form. I'm
 working on that.)
2017-10-15 19:17:30 +00:00
abhinav fa61555626 Add support for escaping special characters when doing filename completion.
For instance if the file name is "foo bar":
$ ls foo<TAB>
should get autocompleted to:
$ ls foo\ bar

Works for similar other characters too, which need escaping.

Also, add an accompanying test program to ensure the escaping is correct
in various scenarios (within quotes, without quotes, with other special characeters)

Thanks to Christos for reviews, help and feedback.
2017-10-15 18:59:00 +00:00
ryo a3bfd3d76c return 0xffffffffffffffff (= -1). not 0x00000000ffffffff. 2017-10-12 05:51:51 +00:00
abhinav cf2b6f694e Fix typo in comment 2017-10-11 06:49:03 +00:00
christos 219944fb44 Add a library for the rump resolver interception code so that it will become
easier to hide resolver internals later.
2017-10-10 19:28:33 +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 ab208a3dad Restore CAVEATS section unmodified.
It apparently refers to VAX and its lack of a negative zero.
2017-09-28 15:03:18 +00:00
maya cf91bfe7da List a few more functions 2017-09-28 11:18:41 +00:00
maya f56039ca90 Remove CAVEATS section
The man page for an individual function is not the right place to discuss
the issues with negative zero
2017-09-28 11:09:05 +00:00
wiz e4dcc564b8 Remove Tn. 2017-09-28 05:51:26 +00:00
maya 072aa72f29 move VAX notes to CAVEATS, clarify. 2017-09-27 18:55:50 +00:00
maya 943496d3b4 Fix typo 2017-09-27 10:12:47 +00:00
maya 411564dc9a Mention tgmath cproj, creal, cabs
following copysign example use of "real-floating" with "complex-floating"
2017-09-27 09:20:27 +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
maya 166de49ccc Mention wanting to remove isnanf too, reword 2017-09-26 18:03:30 +00:00
maya 14e90145c6 Add man page link for hypotl.3 2017-09-26 16:01:58 +00:00
maya 3c4aaf3f6f omit mention of cabs (not relevant to this man page)
mention type-generic hypot
mention hypotl
2017-09-26 15:42:54 +00:00
maya 69be559832 Mention there's a type generic variant in tgmath.h
(XXX and in math.h, if you're netbsd)
2017-09-26 15:12:57 +00:00
roy ab1cdcdbe2 Allow a subwindow to contain another subwindow.
This reverts r1.37 and allows wip/rtv to work better.
2017-09-18 10:18:13 +00:00
wiz b2204870d0 Use Dv for non-errno return values (instead of Er). 2017-09-18 08:49:20 +00:00
wiz cf8f895d5c Remove superfluous Tn. 2017-09-18 08:48:23 +00:00
abhinav 2e26e026b9 Fix typo 2017-09-17 21:46:46 +00:00
abhinav 4d2c8c35f1 Add execlpe and execvpe to the NAME section 2017-09-17 11:45:10 +00:00
kre 5312bfd48d PR lib/52547 - read_history (readline.c) should now sets history_length.
Patch from Yen Chi Hsuan in the PR, extracted from Apple's version of
readline.c, then modified by me to be consistent about what the return
value really is.
2017-09-17 08:10:08 +00:00
abhinav 7a99333ffa Fix indentation (convert spaces to tab) 2017-09-16 20:40:34 +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 133682b8bb Support <pthread_typs.h> on C89 compilers
Clang 5.0.0(svn) reports warnings on <pthread_types.h> for C99 constructs
when used with strict -std=c89.

Restrict designated initializers usage to C99 or newer code.
C89 and C++ will share the same code without extension of designated
initializers.

PR 52285
2017-09-09 23:21:45 +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
christos b2ad969a13 For readline emulation, don't reset the tty to "sane" (cooked) mode if we
did not start this way. Also set and reset the tty on entry and exit from
readline() since this is what readline does.
2017-09-05 18:07:59 +00:00
wiz 3e39477b0a Remove trailing whitespace; convert Xr readline to Nm readline, since
we won't get a readline man page in base.
2017-09-02 06:48:10 +00:00
christos 27916d7c22 PR/51517: Jay West: Tty settings not restored on exit
PR/51518: Jay West: prompt is interleaved with client output

Both these issues are caused by rl_restore_handler not DTRT; fix
it so that it kills the internal libedit state completely. This is
inefficient, but it works.

Also fix:
1. add append_history()/H_NSAVE_FP
2. call the rl_startup_hook before printing the first prompt as documented.
   callint it from rl_initialize breaks python, because the callback ends
   up being invoked before the readline module is installed, and we end up
   dereferencing a NULL pointer.
3. add el_resize_terminal.

With those changes, s/lreadline/ledit/g in python works.
2017-09-01 10:19:10 +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
mrg 2a2c35d74b don't build gmp/mpfr/mpc if we're not building GCC commands (MKGCCCMDS==no.) 2017-08-22 08:21:36 +00:00
christos c2e78b1bda add nexttoward for mips64 and aarch64 2017-08-21 17:10:34 +00:00
he 7659ce9cff Actually... s_nexttowardf.c appears to be usable on soft-float as well;
it was for arm earlier and briefly for all mips, so just move it into
COMMON_SRCS.
2017-08-17 13:58:39 +00:00
he 9de3bc60de Move the inclusion of s_nexttowardf.c into a common test for
MKSOFTFLOAT=="no".  This brings us nexttowardf() for sparc, at least.
2017-08-17 09:06:21 +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
nisimura 25f03d5f57 add s_rintl.c for aarch64. ok by ryo@. 2017-08-16 13:34:59 +00:00
he 61fdebe2ec On second thought, don't introduce nexttowardl() since we don't have that
yet elsewhere.
2017-08-16 11:22:52 +00:00
he b2720bf72a In the non-softfloat m68k part, add s_nexttoward.c and s_nexttowardf.c,
so that we get nexttoward() and nexttowardf() implemented here as well.
2017-08-16 09:18:24 +00:00
he 4ca6be884d On systems without __HAVE_LONG_DOUBLE, also alias nexttoward() and
nexttowardl() to nextafter().
2017-08-16 09:15:48 +00:00
mlelstv 7d91d16de6 rintl is required for archs that support long double. 2017-08-15 10:40:28 +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
maxv 0dac6a5c0e Bump - removal of i386_vm86 and i386_pmc. 2017-08-12 19:48:28 +00:00
maxv cc29cfc600 All things considered, remove the i386_pmc API. I deprecated it some
months ago, and clearly no one should be using it.

(reminder: our new PMCs use the same sysarch, but the arguments are
opaque and not compatible with the previous versions)
2017-08-12 08:21:30 +00:00
maxv ee34266187 Remove the i386_vm86 API (instead of just deprecating it). This API is not
available anymore, and any binary using it won't function correctly.
2017-08-12 07:59:42 +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
he 900a3d47b2 Move s_nearbyint.c out of the cpu ifdefs and into COMMON_SRCS,
which is used everywhere except on vax.  This is to simplify and
to ensure the function is included in the build, allowing us to
re-add the nearbyint() test.
2017-08-11 20:24:56 +00:00
maxv c8550ea9c2 Deprecate. 2017-08-06 08:00:40 +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
martin 7f878ea30c pthread__attr_init_private:
malloc+memset -> calloc. Also initialize all values to the proper
defaults.
This fixes the "rustc panic" discussed on pkgsrc-users.
OK: joerg
2017-08-01 12:31:45 +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
he 0cac3e13d5 The sparc port needs s_nearbyint.c as well. 2017-07-27 10:03:10 +00:00
he 4ae65f06c5 Non-softfloat m68k needs s_rintl.c. 2017-07-27 07:01:58 +00:00
he 07051e2f14 Add s_nearbyint.c to alpha, ia64, riscv, mips, powerpc, and sh3 ports. 2017-07-26 09:53:09 +00:00
he e07b573bf9 Add some blank lines to separate the different CPU archs,
for a minimal readability improvement.
2017-07-26 09:42:12 +00:00
martin 53f08c908d Do not use IEEE 754 specific functions for VAX 2017-07-23 09:50:54 +00:00
joerg b373b9e517 .eh_frame should be read-only on MIPS too. 2017-07-18 14:34:19 +00:00
skrll 8342d7e564 Typo in comment 2017-07-17 20:24:07 +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
christos e7a07d38ee PR/52386: Use the number of iterations we document. 2017-07-09 20:21:08 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
joerg d3a99cd597 Do not look at environmental variables for suid/guid binaries. 2017-07-02 17:13:07 +00:00
joerg 5f391f4ae2 Export the guard size of the main thread via vm.guard_size. Add a
complementary writable sysctl for the initial guard size of threads
created via pthread_create. Let the existing attribut accessors do the
right thing. Raise the default guard size for threads to 64KB.
2017-07-02 16:41:32 +00:00
christos 285444fdfa make this standalone. 2017-06-30 21:39:43 +00:00
kre e3112e6cea Allow wide characters (properly encoded as byte strings according to LC_CTYPE)
to be (perhaps part of) the "invisible" characters in a prompt, or the
required prompt character which follows the literal sequence (this character
must be one with a printing column width >= 1).  The literal indicator
character (which is just a marker, and not printed anywhere) (the PSlit
parameter in sh(1)) can also be a wide char (passed to libedit as a wchar_t,
encoded as that by sh(1) or other applications that support this.)

Note: this has currently only been tested with everything ascii (C locale).
2017-06-30 20:26:52 +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
kre 2977f4314f Fix an obvious, but almost invisible typo (avoid some core dumps). 2017-06-29 02:54:40 +00:00
christos f51c99da13 fix comment 2017-06-27 23:29:12 +00:00
christos 9abf018dda add literal escape sequence support, patterned after the tcsh ones. 2017-06-27 23:25:13 +00:00
christos bec29a0714 remove unused variable 2017-06-27 23:24:19 +00:00
christos 3d09ba7b3f - add literal sequence handling. 2017-06-27 23:23:48 +00:00
christos 06d596a8e9 - handle literal escape sequence printing.
- factor out common code in allocation and freeing of the display.
2017-06-27 23:23:09 +00:00
christos 0a321818f6 mention the limitation of the literal sequence delimiter. 2017-06-27 23:22:20 +00:00
kre 00f36e26a6 Include EDITRC in doc. 2017-06-27 01:22:58 +00:00
kre 4fa1b5993a Make the default editrc file be $EDITRC (from env) if set, falling back
to $HOME/.editrc otherwise.    Better support for this in sh coming.
2017-06-27 00:47:37 +00:00
maya 5b9f416541 Correct misleading indentation. NFC
From GCC8
2017-06-22 12:43:43 +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
christos 65fe324251 remove now unnecessary casts. 2017-06-14 16:39:41 +00:00
kamil 2d1839db7f Stop including <sys/user.h> in userland libraries
This header in this context is freebsdism.
2017-06-14 12:24:51 +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
christos a3ddac400c since ln(1) now uses linkat(2) provide a dumb wrapper. 2017-06-06 19:48:42 +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
christos 79e2355ab8 Adjust to prototype. 2017-05-31 17:56:00 +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 c74ab69c28 Add DragonFly. 2017-05-22 19:16:25 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +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
abhinav b34e0a62c9 Fix typo in the man page reference 2017-05-18 16:41:12 +00:00
roy 2e0a9a1da6 Improve the scope of some variables. 2017-05-16 12:03:41 +00:00
roy 8e374e1b75 Remove ticcmp and extend _ti_checkname so it can be used instead. 2017-05-16 11:16:37 +00:00
roy fc79bac804 Fix prior for multiple terminfo aliases. 2017-05-16 10:29:06 +00:00
roy 2b9f5c3f2c Instead of poking in the binary blob to work out if this is our terminal,
assume it is and load it.
Once loaded then check it's really for us.
This allows us to work out if the indexed alias entry is correct we
this was not checked previously.
2017-05-16 10:25:40 +00:00
roy 2678fcfdf5 Don't bother allocating space for the database name, just print
directly to the static buffer storage.
2017-05-16 09:19:48 +00:00
roy 3edb4adc61 Move pathbuf into the function where it's actually used. 2017-05-16 08:52:14 +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
maya 5b9767ae88 Belatedly bump minor.
lots of changes since -7 (libm.so.0.11), including:
new functions: llroundl, lroundl, erfl, erfcl
partial switch to freebsd catrig
2017-05-13 13:17:11 +00:00
maya 6c9a28baeb Drop superfluous ; in __warn_references 2017-05-13 02:58:03 +00:00
christos a613f690f9 make it the same as rump.h 2017-05-11 18:44:50 +00:00
christos 60b22e867e Don't depend on stars in order to define things. 2017-05-11 17:47:22 +00:00
martin 3397b20a60 Evil hack to fix the build: provide PRIxREGISTER here.
Sevan, please check and fix correctly ;-)
2017-05-11 10:21:55 +00:00
sevan 6b31f116cc With the removal of HAVE_REGISTER_T from rumpuser_port.h, _KERNTYPES does not
need to be defined. This allows register_t to be typedef'd to RUMP_REGISTER_T
without conflict, as highlighted in PR kern/52206.
2017-05-11 04:33:14 +00:00
sevan 64fda0b19a Update NetBSD values obtained from running configure as instructed in comment.
This paves the way to resolve rump build process using buildrump.sh, where the definition of
HAVE_REGISTER_T caused conflicting definitions of register_t.
2017-05-11 04:27:27 +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
sevan 979875ac74 Revert previous change so builds can resume.
_KERNTYPES needs to be defined for NetBSD builds to succeed.
_KERNTYPES must not be defined for buildrum.sh builds to succeed.
2017-05-10 08:48:46 +00:00
mbalmer 0f3108288c Guard against double freeing of objects (explicit by the Lua program, then
later by the garbage collector).
This fixes PR bin/52218.
2017-05-10 07:36:01 +00:00
sevan 9204518573 Do not define _KERNTYPES as this breaks build with buildrump.sh due to
conflicting types for register_t.
Closes PR kern/52206
Steered in the right direction by christos.
2017-05-10 01:11:51 +00:00
christos 518a4ef5c5 Only add a write filter for sockets. It is not supported for vnodes, or
for 1/2 closed fifos (which we both have now).
2017-05-09 21:15: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
maya 468489bfea Correct misleading indentation. NFC
This isn't a functional difference because huge + x > one is
always true for a small x, and is probably a magical incantation
to raise inexact if x != 0

Found by GCC 8.0
2017-05-09 02:04:38 +00:00
christos 048b91431b use the symbolic M_ALL and trim with M_MASK 2017-05-08 14:42:16 +00:00
martin 0dcaa3783b Complete the namespace dance 2017-05-08 09:25:03 +00:00
martin 9bce32444d Add missing namespace.h include 2017-05-08 08:21:56 +00:00
christos 922c79a2e7 Add the imprecise catrigl functions back. 2017-05-07 22:01:54 +00:00
christos ea6fb1417c mention why we don't support this (yet) 2017-05-07 21:59:06 +00:00
martin dc8051aeb0 Limit some rintl usage to #ifdef __HAVE_LONG_DOUBLE.
XXX should probably declare some aliases in the #else case
2017-05-07 11:29:21 +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 6b9cab4173 Bump version 2017-05-06 19:52:25 +00:00
christos 464b32545a Replace our rounding functions with the ones from FreeBSD 2017-05-06 18:03:24 +00:00
christos f7c6682327 add missing namespace.h 2017-05-06 18:02:52 +00:00