Skip to content

tidy installs platform.h #223

Closed
Closed
@ryandesign

Description

@ryandesign

Tidy installs an include file called platform.h in the general include directory (e.g. /opt/local/include in MacPorts). This is a problem because the name of the file is so generic.

This can cause problems with other programs that happen to have a private include file of the same name in their source directory. With a generic name like "platform.h", this is not unlikely. When they write #include "platform.h" they expect to get their private file, but -I/opt/local/include might be in CPPFLAGS, either because the package manager or the user put it there (MacPorts does), or because the project got it from the pkg-config file or *-config script of one of its dependencies. If the project's build system is such that -I/opt/local/include appears before -I. in the compiler invocation, then tidy's platform.h would be used instead of the project's, leading to build failure. That would be an error in that project's build system, but such errors are very common.

In MacPorts, this problem affects qscintilla, and also scite, which uses qscintilla, and probably anything else that uses scintilla or qscintilla.

Please consider either not installing platform.h, or renaming it to tidyplatform.h such that its name is less generic and its association with tidy is clear (which would match the naming of the file tidyenum.h), or moving it and all other installed include files that aren't tidy.h (including buffio.h, whose name is also generic) into a tidy subdirectory (e.g. /opt/local/include/tidy).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions