Page MenuHomeFreeBSD

usr.bin/mandoc build warning/error fixes
AbandonedPublic

Authored by sbruno on Aug 10 2017, 5:30 PM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

aprieger_llnw.com added a comment.EditedAug 10 2017, 5:35 PM

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
sbruno accepted this revision.Jan 3 2018, 11:10 PM
sbruno added reviewers: Doc Committers, jilles.

Any objections?

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
sevan added a subscriber: sevan.Jan 17 2018, 2:37 PM

Any objections?

No

sevan added a comment.Aug 12 2018, 9:20 AM

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

sbruno commandeered this revision.Aug 12 2018, 3:47 PM
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.

sbruno abandoned this revision.Aug 12 2018, 3:47 PM