This reverts commit 470f9f13de.
I need more time to figure out how to make this work correctly with
incremental builds, which it currently miserably fails on.
There is no reason anymore to not build these as PIE. Unfortunately
bsd.lib.mk does not allow for building _only_ PIE static libraries, so
lib/clang/Makefile.inc needs a kludge to work around that issue.
MFC after: 1 week
I accidentally copied this to the wrong place, or by accident to two
places, during the merge of llvmorg-17-init-19304-gd0b54bb50e51.
Fixes: 06c3fb2749
MFC after: 3 days
Pseudo-filesystems often cannot compute the size of the file correctly
and report 0 for the size. Ignore the size when it's zero and fallback
to the size unknown code.
PR: 276093
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/985
Use the locale-specific path for localized pages and the appropriate parent
directory for file arguments when handling redirects.
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1019
In end of life (EOL) warning cases: freebsd-update fetch install (the
two commands, combined) may fetch and patch, but not install.
Instead: run the two consecutively. Consistent with installation
information in /releases/ areas and with accepted
https://reviews.freebsd.org/D42722
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1096
`prev` may be used uninitialized if `body` starts with a newline.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D43534
- Cover all code paths.
- When decoding, check all output files, not just the last one.
- A simple `ferror()` check is not enough as an error may later occur
while flushing whatever remains in the output buffer.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43532
man.sh needs to handle double quotes and sub shell character
as '`' '$' etc.
PR: 275967
Reviewed by: bapt
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43453
The comparison function had the ordering reversed causing join(1) to
miss some matching lines.
PR: 232405
Submitted by: Martijn van Duren <martijn@openbsd.org>
MFC after: 1 week
In 2005, Gnu find deprecated '+' as the leading character for the -perm
argument, instead preferring '/' with the same meaning. Implement that
behavior here, and document it in the man page.
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1060
echo -e is not portable. It can be replaced by printf %b (it works
only with the /bin/sh built-in echo, not /bin/echo anyway).
head -# is not portable, but head -n # is.
Replace these two things in three places total.
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1062
Output a line as soon as it is possible to determine that it will have
to be output. For the basic case, this means output each line as it is
read unless it is identical to the previous one. For the -d case, it
means output the first instance as soon as the second is read, unless
the -c option was also given. The -D and -u cases were already fine.
Add test cases for interactive use with no options and with -d.
Explicitly ignore -d when -D is also specified.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: rew, kevans
Differential Revision: https://reviews.freebsd.org/D43382
These new tests cover more functionality and are easier to extend.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D43381
Since we expect the entry to still be valid after calling into PAM,
which may call getpwnam() itself, we need to use getpwnam_r().
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, imp, allanjude, markj
Differential Revision: https://reviews.freebsd.org/D43376
Print number of files processed and path currently being processed on
SIGINFO.
Reviewed by: des, asomers
Sponsored by: Axcient
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43380
The standard is somewhat unclear, but on the balance, I believe that the
phrase “the rest of the input line” should be interpreted to mean the
rest of the input line including the terminating newline if and only if
there is one. This means the current implementation is incorrect on two
points:
- First, it suppresses the previous line's newline in the '1' case.
- Second, it unconditionally emits a newline at the end of the output
for non-empty input, even if the input did not end with a newline.
Resolve this by rewriting the main loop. Instead of special-casing the
first line and then assuming that every line ends with a newline, we
remember how each line ends and emit that either at the beginning of
the next line or at the end of the file except in the one case ('+')
where the standard explicitly says not to.
While here, try to reduce diff to upstream a little and update their
RCS tag to reflect the fact that while we've diverged significantly
from them, we've incorporated all their changes. Remove the useless
second RCS tag.
We also update the tests to account for the change in interpretation
of the '1' case and add a test case for unterminated input.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D43326
setjmp() requires that any stack variables modified between the setjmp
call and the longjmp() must be volatile. This means that 'saveint' in
grabh() must be volatile, since it's modified after the setjmp().
Otherwise, the signal handler is not properly restored, resulting in a
crash (SIGBUS) if ^C is typed twice while composing.
PR: 276119
Reported by: Christopher Davidson <christopher.davidson@gmail.com>
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/993
Fix for hexdump -s not being able to skip files residing in
pseudo-filesystems that advertise a zero size value.
Historically, many pseudofs-based filesystems (e.g., procfs) report
a va_size of 0 for numerous files classified as regular files.
Typically, the contents of these files are generated on demand
from kernel data as sbuf(9) strings at the time they are read.
Accurately reporting the size of these files is challenging, as it
often involves generating their contents. These pseudofs implementations
frequently report the size as 0. This is a historical behavior and also
aligns with Linux behavior. To maintain compatibility, we have chosen
to preserve the existing behavior and address it in the userland
application, rather than modifying it in the kernel (by updating the
correct value for va_size).
PR: bin/276106
MFC after: 1 week
Add the missing -q option to the nfsstat(1) manpage SYNOPSIS (it is
already documented in DESCRIPTION), and add the missing -E and -q
options to the built-in usage output.
PR: 275912
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/958
On the manpage of diff(1), "when" is mistyped to "wen".
Event: Advanced UNIX Programming Course (Fall'23) at NTHU.
Signed-off-by: Pin-Yi Kuo <kuokuoyiyi@gapp.nthu.edu.tw>
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/943
- Using non-default ('\n') separator will produce an output with the
separator at the end of the output, eg.
% echo "[$(seq -s ' ' 0 2)]"
[0 1 2 ]
- The output should always be followed by a new line character. Currently:
% seq -s ' ' 0 2
0 1 2 %
This change makes seq(1) to behave the same way Linux seq(1):
% echo "[$(seq -s ' ' 0 2)]"
[0 1 2]
% seq -s ' ' 0 2
0 1 2
%
Approved by: oshogbo
Differential Revision: https://reviews.freebsd.org/D43094