Page MenuHomeFreeBSD

usr.bin/mandoc build warning/error fixes
AbandonedPublic

Authored by sbruno on Aug 10 2017, 5:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 8:36 AM
Unknown Object (File)
Oct 8 2024, 3:09 AM
Unknown Object (File)
Oct 6 2024, 6:43 PM
Unknown Object (File)
Oct 6 2024, 1:31 PM
Unknown Object (File)
Oct 1 2024, 1:29 PM
Unknown Object (File)
Sep 28 2024, 12:43 AM
Unknown Object (File)
Sep 26 2024, 8:41 AM
Unknown Object (File)
Sep 16 2024, 6:22 PM
Subscribers

Details

Reviewers
jilles
aprieger_llnw.com
Group Reviewers
Doc Committers
Summary

Code changes to fix the warnings/errors when building the application in the usr.bin/mandoc folder

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Changelog:
Pre-fix warnings located at: https://gist.github.com/aprieger-llnw/53047c8a5d6eb6c28281e41a30e7d1da

  1. contrib/mdocml/main.c
    • warning: implicit declaration of function 'getline' is invalid in C99 [-Wimplicit-function-declaration]
      • fix: defined _WITH_GETLINE on line 37 to allow the 'getline' function to be used with POSIX, according to the FreeBSD manual
  2. contrib/mdocml/mandocdb.c
    • warning: implicit declaration of function 'getline' is invalid in C99 [-Wimplicit-function-declaration]
      • fix: defined _WITH_GETLINE on line 43 to allow the 'getline' function to be used with POSIX, according to the FreeBSD manual
  3. contrib/mdocml/manpath.c
    • warning: implicit declaration of function 'getline' is invalid in C99 [-Wimplicit-function-declaration]
      • fix: defined _WITH_GETLINE on line 28 to allow the 'getline' function to be used with POSIX, according to the FreeBSD manual
This revision is now accepted and ready to land.Jan 3 2018, 11:11 PM
jilles requested changes to this revision.Jan 4 2018, 12:59 AM

As of rS303524 (July 2016), _WITH_GETLINE is no longer checked by stdio.h. Therefore, there are two possibilities:

  • either the source code being built does not have the change rS303524, and working around it is inappropriate;
  • or the system running the build does not have the change and the warnings occur during the bootstrap-tools phase of the build (building a makewhatis binary for use during the build itself). In this case, it seems more appropriate to add -D_WITH_GETLINE to some kind of compiler flags specific to bootstrap tools, so that this workaround can be removed eventually and no conflicts can be caused with upstream changes. Alternatively, the warning during bootstrap-tools could be ignored.
This revision now requires changes to proceed.Jan 4 2018, 12:59 AM

A new release of mandoc was posted last week, is this still valid?

sbruno edited reviewers, added: aprieger_llnw.com; removed: sbruno.

A new release of mandoc was posted last week, is this still valid?

Probably not. I'll shut this review down for now.