Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Many Uses of ace/pre.h and ace/post.h #4123

Merged
merged 1 commit into from Apr 19, 2023

Conversation

iguessthislldo
Copy link
Member

Some headers used pre.h without post.h which leaks pragma pack (push, 8) into the code using those headers. Even if this was fixed, it's not clear what is gained by using these headers, except maybe improved ABI compatibility, in case the alignment changed somehow. OpenDDS doesn't guarantee ABI compatibility at all though, so this seems like this doesn't do anything for us. Instead of using these headers inconsistently, remove them everywhere except for the libraries that consistently use them, the modeling and the QoS XML libraries.

Also made some tweaks to the lint script:

  • Enable the check_for_pre_and_post ACE check for the remaining cases of pre.h and post.h.
  • Improve logic for finding ACE using $ACE_ROOT by treating it as a candidate instead of automatically accepting it.
  • Fix else brackets.

Some headers used `pre.h` without `post.h` which [leaks `pragma pack (push, 8)`](
https://github.com/DOCGroup/ACE_TAO/blob/ab3b192fcda5715a0c92e5627acdeb4e8f71911c/ACE/ace/pre.h#L17)
into the code using those headers. Even if this was fixed, it's not
clear what is gained by using these headers, except maybe
[improved ABI compatibility](
https://github.com/DOCGroup/ACE_TAO/blob/ab3b192fcda5715a0c92e5627acdeb4e8f71911c/ACE/ChangeLogs/ChangeLog-2000a#L9726-L9762),
if the alignment changed somehow. OpenDDS doesn't guarantee ABI
compatibility at all though, so this seems like this doesn't do anything
for us. Instead of using these headers inconsistently, remove them
everywhere except for the libraries that consistently use them, the
modeling and the QoS XML libraries.

Also made some tweaks to the lint script:
- Enable the `check_for_pre_and_post` ACE check for the remaining cases
  of `pre.h` and `post.h`.
- Improve logic for finding ACE using `$ACE_ROOT` by treating it as a
  candidate instead of automatically accepting it.
- Fix else brackets.
@jrw972 jrw972 merged commit b7e4024 into OpenDDS:master Apr 19, 2023
123 of 124 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants