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

attribute(ms_struct) is only valid for x86 #980

Open
wants to merge 1 commit into
base: vanilla
Choose a base branch
from

Conversation

th-otto
Copy link
Contributor

@th-otto th-otto commented Mar 24, 2024

No description provided.

@th-otto th-otto force-pushed the PR-33 branch 3 times, most recently from e31160f to b6699ff Compare March 24, 2024 08:36
@th-otto
Copy link
Contributor Author

th-otto commented Mar 24, 2024

That damn clang-format is driving me mad ;)

Unfortunately i cannot check that before pushing the commit, because clang format version 16 installed here produces slightly different results. Is there some way to adjust the settings such that they behave the same?

A diff after running clang-format is attached

format.diffs.txt

@OmniBlade
Copy link
Contributor

Yeah, clang-format not being predictable between versions is a great source of annoyance and makes using shared clang-format configurations much more difficult than it should be.

Regarding the changes, if you can make the padding consistent across all platforms without the attribute, the code can be simplified by removing the conditional stuff and remove the BITFIELD_STRUCT macro entirely, though this will then require some testing to ensure cross platform networking still works.

@th-otto
Copy link
Contributor Author

th-otto commented Mar 25, 2024

That might be possible. However for the bitfields, you'll still need conditionals for big-endian systems. Of course that must be done carefully, but i've already added new tests to check the current layout.

BTW, if i'm not wrong, then only red alert currently takes care of swapping the packets that go over the network. For Tiberian Dawn, that seems to be still missing.

I also want to check the EventClass type. If i'm not wrong, that is not used anywhere in the network code. It only affects MAX_IPX_PACKET_SIZE for whatever reason.

@giulianobelinassi
Copy link
Collaborator

@OmniBlade @hifi @tomsons26 what do you think?

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