dragonfly.git
11 months agolibssh: Disable use of openssl engine.
zrj [Fri, 12 Apr 2019 17:24:53 +0000 (20:24 +0300)]
libssh: Disable use of openssl engine.

11 months agoldns: Add OPENSSL_NO_ENGINE checks.
zrj [Fri, 12 Apr 2019 17:23:56 +0000 (20:23 +0300)]
ldns: Add OPENSSL_NO_ENGINE checks.

Functionality is unused.

11 months agodrm/linux: Add trace/events/dma_fence.h
François Tigeot [Wed, 24 Apr 2019 09:11:40 +0000 (11:11 +0200)]
drm/linux: Add trace/events/dma_fence.h

11 months ago<unistd.h>: FWIW, set _XOPEN_ENH_I18N, per the standard.
Sascha Wildner [Wed, 24 Apr 2019 08:51:49 +0000 (10:51 +0200)]
<unistd.h>: FWIW, set _XOPEN_ENH_I18N, per the standard.

We support all functions that it originally required, when it was
still optional. It won't have any impact on anything, as far as I
can see, so this commit is more cosmetic than anything else.

While here, improve some comments.

11 months agoSync indent(1) with FreeBSD.
Sascha Wildner [Wed, 24 Apr 2019 07:10:38 +0000 (09:10 +0200)]
Sync indent(1) with FreeBSD.

A number of new options. Also -troff is gone.

11 months ago<unistd.h>: Bump _POSIX_THREAD_SAFE_FUNCTIONS to 200112L.
Sascha Wildner [Wed, 24 Apr 2019 06:59:07 +0000 (08:59 +0200)]
<unistd.h>: Bump _POSIX_THREAD_SAFE_FUNCTIONS to 200112L.

It became non-optional anyway in 200809. We have all the functions
that 200112 required in the option, so I don't see why not.

Thanks to zrj for checking with a dports bulk build.

11 months agoman(1): Adjust manual page search path a bit.
Sascha Wildner [Wed, 24 Apr 2019 05:30:33 +0000 (07:30 +0200)]
man(1): Adjust manual page search path a bit.

Our old one, basically.

11 months agomakedb: Ignore makewhatis(8) errors.
Sascha Wildner [Tue, 23 Apr 2019 23:02:27 +0000 (01:02 +0200)]
makedb: Ignore makewhatis(8) errors.

Might occur with make distribution building a master IMG on release or
vice versa, due to the location change of makewhatis (its database
format has changed too).

11 months agodrm/linux: Add config_enabled()
François Tigeot [Tue, 23 Apr 2019 20:23:51 +0000 (22:23 +0200)]
drm/linux: Add config_enabled()

11 months agoLink mandoc(1) as 'whatis' too.
Sascha Wildner [Tue, 23 Apr 2019 19:51:08 +0000 (21:51 +0200)]
Link mandoc(1) as 'whatis' too.

Reported-by: zrj
11 months agohammer2(8): Document dependency on thread library.
zrj [Tue, 23 Apr 2019 16:26:55 +0000 (19:26 +0300)]
hammer2(8): Document dependency on thread library.

While there, start using PRIVATELIB_CFLAGS.

11 months agolibc: Move out locking from vsyslog() core.
zrj [Tue, 23 Apr 2019 16:16:12 +0000 (19:16 +0300)]
libc: Move out locking from vsyslog() core.

For consistency with openlog() and closelog().

While there, use SOCK_CLOEXEC directly and do not attempt to closelog()
several times for badly written programs (LogFile is handled internally).

11 months agolibc: Fix few typos in vsyslog().
zrj [Tue, 23 Apr 2019 15:54:32 +0000 (18:54 +0300)]
libc: Fix few typos in vsyslog().

While there, move variable declarations to top and remove braces.

11 months agogcc47: Disconnect objc components from world.
zrj [Tue, 23 Apr 2019 15:47:56 +0000 (18:47 +0300)]
gcc47: Disconnect objc components from world.

11 months agoRemove groff from base.
Sascha Wildner [Tue, 23 Apr 2019 17:45:56 +0000 (19:45 +0200)]
Remove groff from base.

There is a dports package available for people who need it. Also,
for some manual pages in dports, man(1) will report that mandoc(1)
cannot render them, and advise to install groff too, which man(1)
will then use.

Also remove vgrind(1) and the old base me(7) macros.

Disable the groff part of manlint for now, also mandiff. I will
decide later if it should be made to work with dports groff.

There are a number of related utilities, like colcrt, checknr etc.
that I have not touched yet. Their fate will be decided later.

There are also some references to these tools left in existing
manual pages.

11 months agoRemove no longer needed catman periodic via 'make upgrade'.
Sascha Wildner [Mon, 22 Apr 2019 22:42:11 +0000 (00:42 +0200)]
Remove no longer needed catman periodic via 'make upgrade'.

11 months agodrm/linux: Add list_for_each_entry_continue_reverse()
François Tigeot [Mon, 22 Apr 2019 20:55:13 +0000 (22:55 +0200)]
drm/linux: Add list_for_each_entry_continue_reverse()

Obtained-from: OpenBSD

11 months agoDeprecate and remove OPIE from PAM.
zrj [Mon, 22 Apr 2019 08:42:16 +0000 (11:42 +0300)]
Deprecate and remove OPIE from PAM.

This will require user intervention to manually disable OPIE usage or
cleanly reinstall pam.d/* (even better if no modifications were done).
Due to very strict used "requisite" requirements any pam_opie loading
error will result in unusable system except for singe user mode.
Add warning for the user. Sooner or later this will need to be done.

While there, disable installing /etc/pam.d/rsh script. It can be removed.

11 months agokernel/tty: Use GID_TTY for non root users by default.
zrj [Fri, 19 Apr 2019 10:32:55 +0000 (13:32 +0300)]
kernel/tty: Use GID_TTY for non root users by default.

Previous behaviour defaulting to GID_WHEEL was confusing OpenSSH tests.

11 months agoRemove the old GNU man, makewhatis and manpath.config.5 manual page.
Sascha Wildner [Mon, 22 Apr 2019 15:27:08 +0000 (17:27 +0200)]
Remove the old GNU man, makewhatis and manpath.config.5 manual page.

11 months agoSwitch to the new man(1) command.
Sascha Wildner [Mon, 22 Apr 2019 15:24:19 +0000 (17:24 +0200)]
Switch to the new man(1) command.

* Exchange our old GNU man(1) command with the one from FreeBSD that I
  recently imported. It uses mandoc(1) by default. If mandoc(1) reports
  that it cannot render a page, man(1) will fall back to groff (right
  now our base groff, later the groff pkg when we remove it).

* Install mandoc(1) as apropos(1) and makewhatis(8). This means
  makewhatis moves from /usr/sbin to /usr/bin.

* Use mandoc(1) instead of groff for most purposes of bsd.man.mk.

* Remove /usr/share/man/cat*. It's not necessary anymore to cache
  formatted manual pages.

11 months agoKind of sync makewhatis.local with FreeBSD. Ignore r/o directories.
Sascha Wildner [Sun, 21 Apr 2019 16:23:05 +0000 (18:23 +0200)]
Kind of sync makewhatis.local with FreeBSD. Ignore r/o directories.

One or two improvements to the manual page by me.

11 months agodrm/linux: Add down_read_trylock()
François Tigeot [Sun, 21 Apr 2019 15:41:42 +0000 (17:41 +0200)]
drm/linux: Add down_read_trylock()

11 months agoSync manctl(8) with FreeBSD.
Sascha Wildner [Sun, 21 Apr 2019 08:29:12 +0000 (10:29 +0200)]
Sync manctl(8) with FreeBSD.

Basically, don't mention the unimplemented purge command anymore.

11 months agoRemove catman(1) since it is no longer needed in modern times.
Sascha Wildner [Sun, 21 Apr 2019 08:24:11 +0000 (10:24 +0200)]
Remove catman(1) since it is no longer needed in modern times.

It was used to bulk format manual pages for faster displaying.

su(1)'s EXAMPLES section was taken from FreeBSD.

Our man(1) command still stores and utilizes manual pages in
/usr/share/man/cat* after this commit.

11 months agousr.bin/man: Some local adjustments, also bump .Dd.
Sascha Wildner [Sun, 21 Apr 2019 07:32:35 +0000 (09:32 +0200)]
usr.bin/man: Some local adjustments, also bump .Dd.

11 months agoAdd FreeBSD's man(1) command unchanged but don't hook in just yet.
Sascha Wildner [Sun, 21 Apr 2019 07:30:26 +0000 (09:30 +0200)]
Add FreeBSD's man(1) command unchanged but don't hook in just yet.

It will use mandoc if the manual page is supported by it (all our
base manual pages are). If unsupported, as could be the case for
ports manual pages, it will fall back to groff. If groff isn't
found, it will advise to install the groff package.

11 months agohammer2 - Improve verbosity of CHECK errors on the console (2)
Matthew Dillon [Sat, 20 Apr 2019 22:19:20 +0000 (15:19 -0700)]
hammer2 - Improve verbosity of CHECK errors on the console (2)

* Also print the PFS name along with the device.

11 months agohammer2 - Improve verbosity of CHECK errors on the console
Matthew Dillon [Sat, 20 Apr 2019 22:01:06 +0000 (15:01 -0700)]
hammer2 - Improve verbosity of CHECK errors on the console

* Improve the verbosity of CHECK errors on the console.  Print
  the block-type in human-readable form, and attempt to trace
  it back to its governing inode and report the inode number
  the error is in.

* Also print the device path string associated with the mount
  so we know what block device the error occurred on.

11 months agoCAM - A few more kmalloc -> xpt_alloc_ccb fixes
Matthew Dillon [Sat, 20 Apr 2019 21:27:01 +0000 (14:27 -0700)]
CAM - A few more kmalloc -> xpt_alloc_ccb fixes

* Fix (now improper) kmalloc()s of ccbs in the ASR and MPS
  drivers.  Properly use xpt_alloc_ccb().

11 months agocross-tools: Do not install manpages during this stage.
zrj [Fri, 19 Apr 2019 17:01:56 +0000 (20:01 +0300)]
cross-tools: Do not install manpages during this stage.

Saves ~1s and few KBs in /usr/obj/.

11 months agolibutil: Prevent leaking slave fd on failed fork.
zrj [Thu, 18 Apr 2019 20:02:31 +0000 (23:02 +0300)]
libutil: Prevent leaking slave fd on failed fork.

11 months agolibc: Implement properly pthread_equal() stub.
zrj [Thu, 18 Apr 2019 20:01:47 +0000 (23:01 +0300)]
libc: Implement properly pthread_equal() stub.

Functional stub is needed to avoid forcing thread library on librecrypto.

11 months agoFix a couple of NULL dereferences in error paths.
Sascha Wildner [Thu, 18 Apr 2019 14:53:24 +0000 (16:53 +0200)]
Fix a couple of NULL dereferences in error paths.

11 months agokernel: Use NULL for pointers, not 0.
Sascha Wildner [Thu, 18 Apr 2019 07:34:20 +0000 (09:34 +0200)]
kernel: Use NULL for pointers, not 0.

11 months agokernel/libiconv: Compare a char with \0.
Sascha Wildner [Thu, 18 Apr 2019 07:34:01 +0000 (09:34 +0200)]
kernel/libiconv: Compare a char with \0.

11 months agohammer2: Improve bulkfree console logging
Matthew Dillon [Thu, 18 Apr 2019 05:14:23 +0000 (22:14 -0700)]
hammer2: Improve bulkfree console logging

* Improve console logging, only print one buf= line and make the
  'pass' lines fit in 80 columns.  Improve the media coverage
  message so users are not confused.

* There is no need to allocate an excessively-large buffer when
  the bitmap for the entire media fits.  Cap the buffer size for
  this case.

11 months agolibc/rpc: Fix -Wtype-limits.
Sascha Wildner [Tue, 16 Apr 2019 08:13:52 +0000 (10:13 +0200)]
libc/rpc: Fix -Wtype-limits.

Instead of triggering a warning by checking if the passed type is signed
split the INT_STRLEN_MACRO() into two, one for unsigned and the other for
signed types. The latter isn't used and was added just for completeness.

11 months agolibc: Fix some more -Wmissing-prototypes warnings.
Sascha Wildner [Tue, 16 Apr 2019 07:06:03 +0000 (09:06 +0200)]
libc: Fix some more -Wmissing-prototypes warnings.

11 months ago<time.h>: Provide time2posix(), posix2time() prototypes.
Sascha Wildner [Sat, 13 Apr 2019 22:40:01 +0000 (00:40 +0200)]
<time.h>: Provide time2posix(), posix2time() prototypes.

They have a manual page too. Also provide offtime() and timeoff()
prototypes.

Fixes some -Wmissing-prototypes warnings.

11 months agoUpdate the pciconf(8) database.
Sascha Wildner [Tue, 16 Apr 2019 06:55:41 +0000 (08:55 +0200)]
Update the pciconf(8) database.

April 12, 2019 snapshot from https://pci-ids.ucw.cz

11 months agogcc80: Document -save-temps=objects addition.
zrj [Tue, 16 Apr 2019 04:15:47 +0000 (07:15 +0300)]
gcc80: Document -save-temps=objects addition.

11 months agogcc80: Update manpages.
zrj [Tue, 16 Apr 2019 03:38:32 +0000 (06:38 +0300)]
gcc80: Update manpages.

11 months agoAdjust makefiles for GCC80 update.
zrj [Tue, 16 Apr 2019 02:43:32 +0000 (05:43 +0300)]
Adjust makefiles for GCC80 update.

11 months agoMerge remote-tracking branch 'origin/vendor/GCC80'
zrj [Tue, 16 Apr 2019 03:28:06 +0000 (06:28 +0300)]
Merge remote-tracking branch 'origin/vendor/GCC80'

11 months agoBring in branch-8 bugfixes into GCC80. vendor/GCC80
zrj [Tue, 16 Apr 2019 02:39:06 +0000 (05:39 +0300)]
Bring in branch-8 bugfixes into GCC80.

Bugfixes as of April 15.
Huge thanks to gcc developers for keeping longterm branches and
backporting/testing all the bugfixes.

11 months agoUpdate GCC80 to version 8.3
zrj [Tue, 16 Apr 2019 02:37:34 +0000 (05:37 +0300)]
Update GCC80 to version 8.3

11 months agobsd.lib.mk: Fix SHLIB_LINK handling.
zrj [Mon, 15 Apr 2019 17:37:14 +0000 (20:37 +0300)]
bsd.lib.mk: Fix SHLIB_LINK handling.

Checks should be for TARGETs. Also .so should be created in LIBDIR version.

No functional change intended on master.

11 months agogcc80: Make LTO plugins installation consistent.
zrj [Mon, 15 Apr 2019 17:33:42 +0000 (20:33 +0300)]
gcc80: Make LTO plugins installation consistent.

Previously my LTO additions were (ab)using bug in bsd.lib.mk.
All other cases in world override both variables.
Do the same fix for gcc47 too.

No functional change intended.

11 months agolibc: Adjust HISTORY sections in a few recently added manual pages.
Sascha Wildner [Sun, 14 Apr 2019 10:58:07 +0000 (12:58 +0200)]
libc: Adjust HISTORY sections in a few recently added manual pages.

11 months agotimingsafe_bcmp.3: Add missing .Lb.
Sascha Wildner [Sun, 14 Apr 2019 01:06:43 +0000 (03:06 +0200)]
timingsafe_bcmp.3: Add missing .Lb.

11 months agoPRIV: Add transitional handling in bsd.lib.mk.
zrj [Fri, 12 Apr 2019 13:03:44 +0000 (16:03 +0300)]
PRIV: Add transitional handling in bsd.lib.mk.

Allow certain versioned private libraries to be installed into public
libraries directory. PRIVATELIB libraries already have mangled names.

11 months agoPRIV: Add helper tool.
zrj [Fri, 12 Apr 2019 07:55:29 +0000 (10:55 +0300)]
PRIV: Add helper tool.

To speed up vendor updates.

11 months agofactor(6): Convert to BN_is_prime_ex().
zrj [Fri, 12 Apr 2019 07:51:56 +0000 (10:51 +0300)]
factor(6): Convert to BN_is_prime_ex().

11 months agohammer2 - Performance work
Matthew Dillon [Fri, 12 Apr 2019 06:16:32 +0000 (23:16 -0700)]
hammer2 - Performance work

* Implement immediate (async) flush follow-through when OS requests
  it, with write-clustering support at the device level if enabled.
  Write-clustering support at the device level is disabled by default
  because H2 already uses a fairly large and efficient 64K block size.

* Change the XOP dispatch for strategy functions.  Further partition
  strategy functions by read or write to prevent reads from getting
  stuck behind long write chains.

  Also do not span-out I/O related to a single inode across too many
  XOP threads as doing so creates a massive amount of unnecessary
  lock contention.

* Significantly improves concurrent filesystem ops and I/O and
  significantly improves sequential filesystem write I/O.

11 months agohammer2 - Add debugging directive for calculating dirent crcs
Matthew Dillon [Fri, 12 Apr 2019 03:08:43 +0000 (20:08 -0700)]
hammer2 - Add debugging directive for calculating dirent crcs

* Add a debugging directive 'dhash' that can calculate the
  crc for extended directory entries (ones that overflow into
  a data block).

11 months agohammer2 - Correct allocator race and related corruption
Matthew Dillon [Fri, 12 Apr 2019 02:04:56 +0000 (19:04 -0700)]
hammer2 - Correct allocator race and related corruption

* When allocating fragments (below 16KB), for example 1K directory
  entries, 1K inodes, compressed file blocks that happen to be
  fragments, or end-of-file fragments, the allocator must ensure
  that any partially freed block is set back to fully allocated.

* In this specific case the allocator was not setting the
  correct bits in the freemap.  The situation never occurs
  on a block boundary (different code is executed which does
  the correct calculation), so the related block will always
  be in a minimally allocated state (either partially allocated
  or fully allocated).

  This means that the corruption can only happen under the specific
  circumstance where a fragment is allocated out of a block that
  the bulkfree code is simultaneously trying to free (marking it
  partially-allocated).  Because the wrong bits are set, the NEXT
  bulkfree pass can also miss the fact that the fragment is
  allocated and finish transitioning the block from partially-
  allocated to fully-free.

  A later allocation then corrupts the block, resulting in CHECK
  errors on the console.

* Because the bulkfree code always comes in and in ALL SITUATIONS OTHER
  THAN THIS SPECIFIC RACE will re-mark the blocks fully-allocated,
  the corruption can ONLY occur during heavy write activity during
  a bulkfree operation, typically when heavy manipulation of directory
  entries or inodes occurs.

* Correct the fragmentary bitmap calculation to set the proper
  bits.

11 months agolibc/rpc: Use sig_t (fixes -Wstrict-prototypes).
Sascha Wildner [Thu, 11 Apr 2019 19:25:18 +0000 (21:25 +0200)]
libc/rpc: Use sig_t (fixes -Wstrict-prototypes).

11 months agolibc/rpc: Fix some -Wstrict-prototypes warnings.
Sascha Wildner [Thu, 11 Apr 2019 18:03:33 +0000 (20:03 +0200)]
libc/rpc: Fix some -Wstrict-prototypes warnings.

11 months agolibc/db: Remove unnecessary casts too.
Sascha Wildner [Thu, 11 Apr 2019 11:03:08 +0000 (13:03 +0200)]
libc/db: Remove unnecessary casts too.

11 months agoftpd(8): Use libutil's pidfile(3) implementation.
Sascha Wildner [Thu, 11 Apr 2019 10:09:43 +0000 (12:09 +0200)]
ftpd(8): Use libutil's pidfile(3) implementation.

This unbreaks buildworld.

Reported-by: zrj
11 months agolibc/db: Fix -Wcast-function-type.
Sascha Wildner [Thu, 11 Apr 2019 09:25:42 +0000 (11:25 +0200)]
libc/db: Fix -Wcast-function-type.

11 months ago<string.h>: Remove legacy declaration of swab().
zrj [Wed, 10 Apr 2019 10:13:28 +0000 (13:13 +0300)]
<string.h>: Remove legacy declaration of swab().

It has prototype in <unistd.h> like in other BSDs and GNU implementations
as per OpenGroups XSI.

11 months agolibc/string: Add timing_safe functions from OpenBSD.
zrj [Tue, 9 Apr 2019 09:17:34 +0000 (12:17 +0300)]
libc/string: Add timing_safe functions from OpenBSD.

Good and small functions for crypto retlated things.
Add manpage and set __pure attributes.

Taken-from: OpenBSD

11 months agolibc/stdlib: Add recallocarray() function.
zrj [Tue, 9 Apr 2019 08:39:05 +0000 (11:39 +0300)]
libc/stdlib: Add recallocarray() function.

It is useful function for security related features, like resizing
memory objects containing sensitive data to avoid information leaking.
Update manpage.

Taken-from: OpenBSD

11 months agolibc/stdlib: Add freezero() function.
zrj [Tue, 9 Apr 2019 08:26:46 +0000 (11:26 +0300)]
libc/stdlib: Add freezero() function.

It is useful function for security related features. Internally uses
explicit_bzero(3) before freeing the pointers. It could be implemented
in nmalloc.c for extra benefits.
Update the manpage.

Taken-from: OpenBSD

11 months agolibc/string: Add explicit_bzero() from OpenBSD.
zrj [Tue, 9 Apr 2019 07:29:03 +0000 (10:29 +0300)]
libc/string: Add explicit_bzero() from OpenBSD.

It is useful function for security related features. It allows to
further manipulate discarded memory region through weak hook.
Update the bzero.3 manpage.

Taken-from: OpenBSD

11 months agolibc/tre: Fix -Wpointer-arith.
Sascha Wildner [Thu, 11 Apr 2019 06:37:39 +0000 (08:37 +0200)]
libc/tre: Fix -Wpointer-arith.

11 months agonscd(8): Remove local pidfile(3) implementation and use libutil's.
Sascha Wildner [Thu, 11 Apr 2019 07:21:07 +0000 (09:21 +0200)]
nscd(8): Remove local pidfile(3) implementation and use libutil's.

11 months agolibc/rpc: Fix some -Wmissing-prototypes.
Sascha Wildner [Wed, 10 Apr 2019 18:31:26 +0000 (20:31 +0200)]
libc/rpc: Fix some -Wmissing-prototypes.

11 months agolibc/locale: Fix -Wmissing-field-initializers.
Sascha Wildner [Wed, 10 Apr 2019 18:06:20 +0000 (20:06 +0200)]
libc/locale: Fix -Wmissing-field-initializers.

12 months agolibc: Remove an age old unused function.
Sascha Wildner [Wed, 10 Apr 2019 13:02:37 +0000 (15:02 +0200)]
libc: Remove an age old unused function.

It was labeled as "historic" even in 1994 and probably much earlier
before FreeBSD existed. Nothing in dports uses it and it was also
not added to Symbol.map so nothing could exist that uses it and is
dynamically linked against our libc.

In-discussion-with: zrj

12 months agolibc: Revert last commit partially. Make function public instead.
Sascha Wildner [Wed, 10 Apr 2019 08:58:00 +0000 (10:58 +0200)]
libc: Revert last commit partially. Make function public instead.

12 months agolibc/net: Align rthdr.c with <netinet6/in6.h> (#if 0 a function).
Sascha Wildner [Wed, 10 Apr 2019 08:48:46 +0000 (10:48 +0200)]
libc/net: Align rthdr.c with <netinet6/in6.h> (#if 0 a function).

Fixes a -Wmissing-prototype.

While here, fix typos in comments.

12 months agolibc: Fix some more -Wmissing-prototype.
Sascha Wildner [Tue, 9 Apr 2019 20:18:46 +0000 (22:18 +0200)]
libc: Fix some more -Wmissing-prototype.

12 months agolibc/glob: Fix a -Wstrict-prototypes warning by bringing back an old fix.
Sascha Wildner [Tue, 9 Apr 2019 18:51:24 +0000 (20:51 +0200)]
libc/glob: Fix a -Wstrict-prototypes warning by bringing back an old fix.

It went like this:

* In 2005, joerg fixed this warning in DragonFly (2a6aec8dab58c89961).

* In 2013, this fix was overwritten without looking with the then still
  broken version from FreeBSD (0d5acd7467c4e95f79).

* In 2015, joerg submitted the fix to FreeBSD and it was committed as
  r288098.

This commit applies back FreeBSD's r288098 to our tree. :)

12 months agoPRIV: Add global PRIVATELIB_CFLAGS.
zrj [Mon, 8 Apr 2019 22:21:33 +0000 (01:21 +0300)]
PRIV: Add global PRIVATELIB_CFLAGS.

In preparations for next updates.

12 months agosbin/hammer: Prefer to use installed private LibreSSL headers.
zrj [Mon, 8 Apr 2019 22:19:54 +0000 (01:19 +0300)]
sbin/hammer: Prefer to use installed private LibreSSL headers.

Requested-by: swildner
12 months agocrunchgen(1): Disable LTO for main() stubs.
zrj [Mon, 8 Apr 2019 19:11:31 +0000 (22:11 +0300)]
crunchgen(1): Disable LTO for main() stubs.

12 months agotcpdump(1): Match struct hnamemem types.
zrj [Mon, 8 Apr 2019 16:01:15 +0000 (19:01 +0300)]
tcpdump(1): Match struct hnamemem types.

They were different between print-atalk.c and addrtoname.c sources.

Caught-by: LTO
12 months agocrontab(1): Fix -flto warnings.
zrj [Mon, 8 Apr 2019 15:39:49 +0000 (18:39 +0300)]
crontab(1): Fix -flto warnings.

The crontab is compiled without -DLOGIN_CAP that in turn was excluding
a field in "struct _entry { ... } entry;" in cron.h header.
Make sure the struct size stays consistent.

Caught-by: LTO
12 months agocrontab(1): Constify few things.
zrj [Mon, 8 Apr 2019 15:33:30 +0000 (18:33 +0300)]
crontab(1): Constify few things.

12 months agosbin/hammer: Fix used include.
zrj [Mon, 8 Apr 2019 13:22:47 +0000 (16:22 +0300)]
sbin/hammer: Fix used include.

It should be <sha.h> for SHA256_Init() and rest.
For now the same as sbin/md5.

Caught-by: -flto
12 months agortquery(8): Fix MD5 prototypes.
zrj [Mon, 8 Apr 2019 11:16:07 +0000 (14:16 +0300)]
rtquery(8): Fix MD5 prototypes.

Do not use local MD5 prototypes.
The libcrypto is not needed, rtquery(8) is static.

Caught-by: LTO
12 months agorouted(8): Fix MD5 prototypes.
zrj [Mon, 8 Apr 2019 11:11:07 +0000 (14:11 +0300)]
routed(8): Fix MD5 prototypes.

Do not use local MD5 prototypes.
The libcrypto is not needed, routed(8) is static.

Caught-by: LTO
12 months agosys/boot/pc32: Fix -flto warnings in pxe.c
zrj [Mon, 8 Apr 2019 11:02:18 +0000 (14:02 +0300)]
sys/boot/pc32: Fix -flto warnings in pxe.c

Provide full structure. Avoids -flto warning:
note: code may be misoptimized unless -fno-strict-aliasing is used

12 months agolibstand: Adjust zlib hadling.
zrj [Mon, 8 Apr 2019 10:22:53 +0000 (13:22 +0300)]
libstand: Adjust zlib hadling.

Avoid crc32.c search issue in .PATH, move Makefile.stand inclusion
before sys/libkern. Add comments why.

12 months agolibstand/gzipfs: Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 09:45:24 +0000 (12:45 +0300)]
libstand/gzipfs: Minor trailing whitespace cleanup.

12 months agolib/libstand: Remove zipfs.c
zrj [Mon, 8 Apr 2019 09:39:03 +0000 (12:39 +0300)]
lib/libstand: Remove zipfs.c

It is unused duplicate of gzipfs.c
Adjust the libstand manpage.

12 months agotelnetd(8): Rename fatal function.
zrj [Mon, 8 Apr 2019 09:01:52 +0000 (12:01 +0300)]
telnetd(8): Rename fatal function.

Avoids symbol conflict with OpenSSH fatal().

12 months agolibkvm: Fix -flto warnings.
zrj [Mon, 8 Apr 2019 07:54:00 +0000 (10:54 +0300)]
libkvm: Fix -flto warnings.

Suggested-by: dillon
12 months agovmstat(8): Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 07:45:30 +0000 (10:45 +0300)]
vmstat(8): Minor trailing whitespace cleanup.

12 months agolibkvm: Minor trailing whitespace cleanup.
zrj [Mon, 8 Apr 2019 07:41:31 +0000 (10:41 +0300)]
libkvm: Minor trailing whitespace cleanup.

12 months agolibc: Add prototypes for various functions we use in __weak_reference().
Sascha Wildner [Mon, 8 Apr 2019 17:14:52 +0000 (19:14 +0200)]
libc: Add prototypes for various functions we use in __weak_reference().

12 months agolibc/stdlib: Fix two -Wunused-parameter warnings.
Sascha Wildner [Mon, 8 Apr 2019 16:22:03 +0000 (18:22 +0200)]
libc/stdlib: Fix two -Wunused-parameter warnings.

12 months agofstat(1): Mangle dev2udev() name.
zrj [Sat, 6 Apr 2019 20:04:59 +0000 (23:04 +0300)]
fstat(1): Mangle dev2udev() name.

Avoid symbol conflicts with libkvm internal one.

12 months agofstat(1): Move out vm_map traversal functions to libkvm.
zrj [Sat, 6 Apr 2019 20:00:10 +0000 (23:00 +0300)]
fstat(1): Move out vm_map traversal functions to libkvm.

For ports benefit.

Suggested-by: dillon
12 months agolibkvm: Raise WARNS.
zrj [Sat, 6 Apr 2019 18:28:10 +0000 (21:28 +0300)]
libkvm: Raise WARNS.

12 months agolibkvm: Suppress last -Wsign-compare warnings.
zrj [Sat, 6 Apr 2019 18:26:48 +0000 (21:26 +0300)]
libkvm: Suppress last -Wsign-compare warnings.

12 months agolibkvm: Remove not needed casts in vsnprintf() calls.
zrj [Sat, 6 Apr 2019 17:56:47 +0000 (20:56 +0300)]
libkvm: Remove not needed casts in vsnprintf() calls.

Caught by -Wcast-qual.