[ https://issues.apache.org/jira/browse/MESOS-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14286031#comment-14286031 ]
Till Toenshoff commented on MESOS-2211: --------------------------------------- I am not convinced that handling the issue in a semi dynamic fashion (as suggested by Bernd) is the right approach for finding a scheme we can rely upon (also within RRs!). Now assuming that we need alternatives to using pragma's, I would like to propose a scheme for mesos: *Anything below 'src/' and below 'include/' should contain all folder names starting after the given offsets as well as the actual header file name within its include guard.* (+) it is a simple rule (-) it may result into rather verbose guard names in a few cases -- but is that really a problem? This scheme obviously is identical for both installed and non installed headers. I am leaving MESOS_ / LIBPROCESS_ / STOUT_ prefixes out of my proposal as AFAIK, so far, we did not have any collisions. > Include guard naming fixup > -------------------------- > > Key: MESOS-2211 > URL: https://issues.apache.org/jira/browse/MESOS-2211 > Project: Mesos > Issue Type: Bug > Reporter: Till Toenshoff > Assignee: Kapil Arya > Priority: Trivial > Labels: newbie > > Triggered by a comment in a review request, I noticed that we currently have > no consistent style for naming include guards. > Examples: > include/mesos/resources.hpp: {{#define __RESOURCES_HPP__}} > include/mesos/executor.hpp: {{#define __MESOS_EXECUTOR_HPP__}} > include/mesos/mesos.hpp: {{#define __MESOS_HPP__}} > I think the **right** way would be stating the path and include file name > within the guard, so the above at fault become: > include/mesos/resources.hpp: {{#define __MESOS_RESOURCES_HPP__}} > include/mesos/mesos.hpp: {{#define __MESOS_MESOS_HPP__}} > Everything from include/XXX should have a __XXX_ prefix in its guard name, > anything from src/XXX should have a __XXX_ prefix. This should also apply to > multiple folder levels; e.g. include/XXX/YYY/FOO should have a __XXX_YYY_FOO > prefix. -- This message was sent by Atlassian JIRA (v6.3.4#6332)