You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "shevek-google (via GitHub)" <gi...@apache.org> on 2026/01/06 10:54:00 UTC

[I] Use "more unique" ifdefs in header guards to avoid clashes [arrow]

shevek-google opened a new issue, #48738:
URL: https://github.com/apache/arrow/issues/48738

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   https://github.com/apache/arrow/blob/main/cpp/src/arrow/vendored/datetime/date.h#L1 defines DATE_H
   
   Two issues with the use of simple tokens as header guards:
   * This isn't the only date.h with a DATE_H in some binaries, so this header guard mistakenly triggers when it shouldn't.
   * If it's private it should probably start with `_` or `__` anyway.
   
   Actual proposed solution:
   Use `#pragma once` which is not vulnerable to clashes with other header files. Arrow has precedent for that in other headers, like https://github.com/apache/arrow/blob/7ba1a7b99b3c036d9d14d345876cfe7194ecaacc/cpp/src/arrow/api.h#L20
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Use "more unique" ifdefs in header guards to avoid clashes [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #48738: [C++] Use "more unique" ifdefs in header guards to avoid clashes
URL: https://github.com/apache/arrow/issues/48738


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Use "more unique" ifdefs in header guards to avoid clashes [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #48738:
URL: https://github.com/apache/arrow/issues/48738#issuecomment-3716539700

   Could you report it to the upstream?
   https://github.com/HowardHinnant/date
   
   We can update our bundled version after the upstream changes something.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org