facebookarchive / libphenom

An eventing framework for building high performance and high scalability systems in C.
http://facebook.github.io/libphenom
Apache License 2.0
1.66k stars 362 forks source link

Use of angle brackets around file names for include statements #70

Closed elfring closed 10 years ago

elfring commented 10 years ago

Would you like to replace any double quotes by angle brackets around file names for include statements?

dhobsd commented 10 years ago

The convention in libphenom is to use quoted pathnames for includes intended to build inside the package and angle brackets for external includes (libc and 3rd party libraries that are assumed to be installed to be able to build).

This convention helps clarify intent in what file is used when building and protects against using system-installed include files of the same name. This allows you to build libphenom on a machine that has libphenom installed (for instance).

elfring commented 10 years ago

There are different opinions about the handling of the involved implementation-defined behaviour.

dhobsd commented 10 years ago

Regardless of what the tooling decides to do, this is the convention used by libphenom to express where it intends to find header files. It seems to work. Are you having real trouble with libphenom resolving the wrong header, experiencing slow builds due to header resolution problems, or is this effectively an issue to paint the bikeshed pink?

elfring commented 10 years ago

I would generally prefer to exclude the potential for the inclusion of header files from unexpected directories. Can such a security detail become a bit more important?

saghul commented 10 years ago

@dhobsd this seems to be a bot posting the same comments on multiple projects. I suggest you ignore it and lock this issue.

wez commented 10 years ago

Won't fix, sorry, it's not worth the effort

dhobsd commented 10 years ago

For posterity, it's worth pointing out that both mechanisms resolve include files in an implementation-defined manner, so changing this wouldn't actually improve security, reduce build time, or fix header resolution in any meaningful way. Since implementations tend to search system include paths first for angle-bracket headers, it is likely that making these changes would actually break the software instead of fix it.

Mentioning because whether or not this is a troll or a bot (or a troll controlling a bot), a newbie may benefit from understanding why such a decision is not worth the effort.