Commit Graph

21037 Commits

Author SHA1 Message Date
christos 4851547888 fix the 32 bit tanl symbol. 2024-02-23 13:42:01 +00:00
rillig 69c5b3b0c1 snprintb: always null-terminate output
Always null-terminate the output in the buffer, even in error cases. The
wording in the manual page has been promising this since 2008. For
snprintb_m, ensure that the output is terminated with two null
characters, to gracefully handle situations in which the caller does not
check whether snprintb returned an error.

If the buffer size is zero, allow the buffer to be a null pointer,
analogous to snprintf.

Fix an out-of-bounds memory read if the bitfmt ends with a '*' directive
(since today).

In the tests, merge the helper functions for snprintb, snprintb_m, as
they were similar enough.

Fix a few 'line_max exceeded' tests, ensuring that they output a '#'
marker, and that the 'complete' tests don't.
2024-02-22 21:04:23 +00:00
rillig d101133e9b snprintb: error out on out-of-bounds bit shifts
Previously, these invoked undefined behavior, now they lead to an early
return. An example of out-of-bounds bit number is in SCZ_PCICTRL_BITS.
Bit fields that extend beyond the msb are still allowed.

Allow 'f' and 'F' to have fields that are 64 bits wide. This only makes
sense when the field starts at bit 0.

Remove the unused 'val_len', it was only needed before snprintb.c 1.20.
2024-02-22 18:26:15 +00:00
rillig aafc9e1277 snprintb.3: sync examples with reality 2024-02-20 20:38:54 +00:00
riastradh fa59e25364 fenv(3): Fix fetestexcept to avoid side effects on trap state.
PR port-amd64/57949
2024-02-20 03:53:48 +00:00
uwe bcbf0090a4 fix typo in comment 2024-02-20 00:09:31 +00:00
rillig fd2741deca mman.h: fix snprintb description for alignment 2^60 2024-02-18 16:55:02 +00:00
kre 7922ccfb13 Revert this part:
strftime %s now uses tm_gmtoff if available.  (Problem and draft
	patch reported by Dag-Erling Smørgrav.)

of the tzcode2924a update.   It is bogus.   The "problem" is/was a simple
misunderstanding of what strftime(%s) is intended to output.  The "fix"
breaks it.
2024-02-18 12:47:08 +00:00
christos f22d611322 Sync with tzcode2024a:
Release 2024a - 2024-02-01 09:28:56 -0800

  Changes to code

    The FROM and TO columns of Rule lines can no longer be "minimum"
    or an abbreviation of "minimum", because TZif files do not support
    DST rules that extend into the indefinite past - although these
    rules were supported when TZif files had only 32-bit data, this
    stopped working when 64-bit TZif files were introduced in 1995.
    This should not be a problem for realistic data, since DST was
    first used in the 20th century.  As a transition aid, FROM columns
    like "minimum" are now diagnosed and then treated as if they were
    the year 1900; this should suffice for TZif files on old systems
    with only 32-bit time_t, and it is more compatible with bugs in
    2023c-and-earlier localtime.c.  (Problem reported by Yoshito
    Umaoka.)

    localtime and related functions no longer mishandle some
    timestamps that occur about 400 years after a switch to a time
    zone with a DST schedule.  In 2023d data this problem was visible
    for some timestamps in November 2422, November 2822, etc. in
    America/Ciudad_Juarez.  (Problem reported by Gilmore Davidson.)

    strftime %s now uses tm_gmtoff if available.  (Problem and draft
    patch reported by Dag-Erling Smørgrav.)

  Changes to build procedure

    The leap-seconds.list file is now copied from the IERS instead of
    from its downstream counterpart at NIST, as the IERS version is
    now in the public domain too and tends to be more up-to-date.
    (Thanks to Martin Burnicki for liaisoning with the IERS.)

  Changes to documentation

    The strftime man page documents which struct tm members affect
    which conversion specs, and that tzset is called.  (Problems
    reported by Robert Elz and Steve Summit.)
2024-02-17 14:54:47 +00:00
uwe 02f7676d3a getnameinfo(3): fix/prettify markup 2024-02-16 22:50:33 +00:00
rillig 6f937561f5 snprintb: rename buflen to bufsize, following the wording in snprintf 2024-02-15 22:48:58 +00:00
jkoshy 262fc961f4 Document the NI_NUMERICSCOPE flag.
PR lib/57832
2024-02-15 15:08:23 +00:00
andvar 48491f9819 Fix few more typos in comments and log message:
s/butoon/button/
s/BUTTOM/BOTTOM/
s/communicaiton/communication/
s/recevice/receive/
s/regiion/region/
2024-02-11 10:36:40 +00:00
andvar 1cd43426d5 Fix various typos in comments, log messages and documentation. 2024-02-10 18:43:51 +00:00
andvar a10c2cec39 fix various typos in comments and log messages. 2024-02-10 09:21:51 +00:00
andvar 5b075dd729 s/psuedo/pseudo/ in comments. 2024-02-10 08:36:03 +00:00
andvar 100a3398b8 fix spelling mistakes, mainly in comments and log messages. 2024-02-09 22:08:30 +00:00
uwe 7a0d941daa signal(3): mention old signal(2) syscall in HISTORY 2024-02-09 17:24:44 +00:00
andvar 82bba4e936 fix various typos in comments. 2024-02-05 21:46:04 +00:00
andvar 5f232faffc s/interrrupt/interrupt/ in comment and editline(3) man page. 2024-02-04 18:47:27 +00:00
uwe 641a20f456 getrawpartition(3): reword to clarify return value, use .Pq
"'a' == 0" is, stricly speaking false, and since 'a' is an int, it's
not immediately clear if it's 'a' or 0 that is returned.  Try to
clarify this.
2024-02-04 18:44:54 +00:00
mrg 2026b7285b update my email address. 2024-02-04 05:43:05 +00:00
rillig 6c33a09efd mblen.3: clean up wording and grammar 2024-02-03 10:55:38 +00:00
andvar f22ed7e5e6 fix various typos in comments. 2024-02-02 22:00:32 +00:00
andvar 82befdcba0 s/shold/should/ 2024-02-02 21:52:22 +00:00
jkoshy 0d507d87e3 Make the err(3) manual clearer to read.
- Mention that the 'fmt' argument to these functions holds
  a printf(3)-like format specification.
- Clarify that the err()/warn()/errc()/warnc() family of functions
  will append an additional error message to the output.
- Add whitespace to separate paragraphs describing distinct
  concepts.
- Move the sentence mentioning the final output newline to
  a less ambiguous location within the text.
- Add a cross-reference to printf(3).
2024-02-02 21:16:41 +00:00
rillig d4c87e8aca snprintb.3: fix examples, clean up wording
In the examples using hex escape sequences, there must be a delimiter
between the escape sequence and the following description if the
description starts with [A-Fa-f], as hex escape sequences are not
limited in length.

Distinguish between a 'directive' (bit + length + description) and a
'description' (only the text).

The fmt parameter is not a string, as strings only reach to the first
'\0' byte, but the new-style format may include additional '\0' as bit
numbers.
2024-02-01 22:18:34 +00:00
christos d44ba2bb3d fix i386 lint 2024-01-27 17:58:36 +00:00
ryoon 64b41b2639 Enable asinl, acosl, logl, coshl, tanhl, atanhl, asinhl and acoshl
* Fix pkgsrc/math/py-numpy and pkgsrc/graphics/py-matplotlib, for example.
2024-01-27 05:50:42 +00:00
wiz aa79da5767 Fix typo 2024-01-26 23:41:55 +00:00
nros d65853d276 sinhf is in the same manual page as sinh not sin 2024-01-26 22:01:40 +00:00
christos b756f940a7 move MD2Transform first. 2024-01-26 21:34:01 +00:00
nros 7690962a14 Add the long double math functions recently added from FreeBSD to their related man pages 2024-01-26 19:27:29 +00:00
ryoon b5a7c060d0 Fix inverted logic for weak alias
* Fix gfortran from pkgsrc/lang/gcc10 and pkgsrc/math/coinmp, for example.
2024-01-26 12:32:49 +00:00
christos ff905cdb8e add the script I used to convert the FreeBSD code. 2024-01-24 04:14:07 +00:00
christos 85f5e301f5 fix nested extern warnings 2024-01-23 17:24:38 +00:00
christos 3f3b0ded09 move inclusion of <machine/ieee.h> to the ieee source files instead of
including it in math_private.h which is also used by the vax which is not ieee.
2024-01-23 15:45:07 +00:00
christos 89f106fbc2 handle sizeof(off_t) > sizeof(size_t) 2024-01-23 15:32:54 +00:00
christos 37feec7425 Add vax 2024-01-23 15:32:18 +00:00
christos 72f355ee42 fix vax build (unused variable) 2024-01-23 15:31:58 +00:00
christos 844ea6ac6a more annotation for powerpc 2024-01-23 12:23:34 +00:00
kre 10af4d8cb4 Bump libm minor rev (libm.so.0.13 -> libm.so.0.14) after addition of
all the long double functions (with actual implementations).
2024-01-22 15:19:38 +00:00
kre fcd5401592 Simply an overly complex way of saying "0 or 1" into a cleaner version.
While here add a commment about how the __i386__ magic LD80C macro
might no longer work on all other arch's as well (if someone can verify
that it still does, or can fix it so that it still works on i386, but
also works everywhere else, then please remove that XXX comment.
The issue I am (perhaps imagining) is the (uint32_t) cast.
2024-01-22 14:26:18 +00:00
kre 1bb3b9e157 This set of changes seem to be sufficient to make at least the
amd64 port build again after the long double math function infusion
from yesterday.

Feel free (without consulting me, I'm just hacking about) to revert
any of this and do it a better way.

Note: this is not intended to be complete, in particular, in <math.h>
I added prototypes only for the functions that are needed for a
successful build, not all of the new ones...
2024-01-22 12:15:19 +00:00
uwe af45bdc82c snprintb(3): restore empty string in snprintb_m example
Restore the empty string at the end of snprintb_m output that was
accidentally removed along with empty string placeholders in the
format strings.  While here, move that example to be next to its
snprintb counterpart.
2024-01-22 00:11:21 +00:00
uwe 635b447434 snprintb(3): update mmap example
Bring over the prettier version of the mmap format string that we have
in the header file for some time now.  Clarify that the final NUL of
the new format string is supplied by the compiler, g/c explicit final
\0 from the example that had it.
2024-01-21 23:57:49 +00:00
uwe 56fe87ce20 snprintb(3): try to improve narration
Try to make the narration more coherent.  Make the old and new
syntaxes easy to distinguish and go out of our way to highlight that
the old syntax uses 1-based bit positions.
2024-01-21 23:44:30 +00:00
rillig cebd2029a2 snprintb.3: remove empty string literals from examples
Suggested by uwe@, as gaps in bitmasks are quite common and thus
shouldn't clutter the code.
2024-01-21 22:06:46 +00:00
rillig 1d4fa4e59b snprintb.3: fix examples
The first example broke the format string at boundaries that didn't
highlight the structure of the format string and also didn't make it
clear that a few bits were omitted from having descriptions.

The second example contained an off-by-one error for SIXTEEN, which was
actually FIFTEEN.

The snprintb_m example repeated the above off-by-one error, and its
output was shown wrong, due to concatenated escape sequences.
2024-01-21 21:31:23 +00:00
christos cfe182f36b Bring in more long double functions from FreeBSD. 2024-01-21 18:53:15 +00:00