harishg33 commented on PR #649:
URL: https://github.com/apache/guacamole-server/pull/649#issuecomment-4187308889

   I understand that this is because it was decided that `config.h` shouldn't 
be included in any headers, because `config.h` doesn't have include guards, so 
it causes conflicts with other macros, as mentioned in 
[GUACAMOLE-2182](https://issues.apache.org/jira/browse/GUACAMOLE-2182?focusedCommentId=18044223&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-18044223).
   
   Removing config.h from rdp.h seems to have caused the issue that was fixed 
here, so we need to add `config.h` in every .c file which makes use of `rdp.h`. 
Wouldn't it be a better idea to create an extra `custom_config.h` whose only 
job will be to include the `config.h` with a include guard of its own ( as 
mentioned in [this 
article](https://coin-or-tools.github.io/BuildTools/config-header.html#bringing-them-all-together)
 ). That way it is also easier to reason about it when we see macros like 
`ENABLE_COMMON_SSH` in headers.
   
   ```c
   #ifndef _CUSTOM_CONFIG_H
   #define _CUSTOM_CONFIG_H
   
   #include "config.h"
   
   #endif
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to