Skip to content

[GEN][ZH] Add endian compat for BIGFileSystems #798

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

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

Conversation

Mauller
Copy link

@Mauller Mauller commented May 2, 2025

This PR is a prerequesit to a PR to unify AsciiString, it adds endian compatibility functions within an endian_compat header.

These are then used in the StdBIGFileSystem as it was previously relying on the ntohl function which was being indirectly provided through the windows header in AsciiString.

This change is necessary to provide cross compat byte swapping functionality.

@Mauller Mauller changed the title [ZH] Add Bswap intrinsics for StdBIGFileSystem [ZH] Add Byte swapping intrinsics for StdBIGFileSystem May 2, 2025
@Mauller Mauller self-assigned this May 2, 2025
@Mauller Mauller added Minor Severity: Minor < Major < Critical < Blocker ZeroHour Relates to Zero Hour Refactor Improves the structure of the code, with negligible changes in function. labels May 2, 2025
@xezon xezon requested a review from OmniBlade May 3, 2025 11:40
@Mauller Mauller force-pushed the bswap-intrinsics branch from 3d48760 to cfa2a8b Compare May 5, 2025 15:09
@Mauller
Copy link
Author

Mauller commented May 5, 2025

Updated with a more fleshed out endian handling compatability header.

@Mauller Mauller changed the title [ZH] Add Byte swapping intrinsics for StdBIGFileSystem [ZH] Add endian compat for StdBIGFileSystem May 5, 2025
@Mauller Mauller force-pushed the bswap-intrinsics branch from cfa2a8b to 4247e96 Compare May 5, 2025 16:15
@Mauller Mauller force-pushed the bswap-intrinsics branch from 4247e96 to 23569f3 Compare May 5, 2025 17:39
@Mauller Mauller force-pushed the bswap-intrinsics branch from 23569f3 to bff165e Compare May 5, 2025 19:16
@Mauller Mauller changed the title [ZH] Add endian compat for StdBIGFileSystem [GEN][ZH] Add endian compat for BIGFileSystems May 6, 2025
@Mauller Mauller force-pushed the bswap-intrinsics branch 2 times, most recently from 3a98c64 to de0f8f7 Compare May 6, 2025 17:32
@Mauller
Copy link
Author

Mauller commented May 6, 2025

Updated, Rebased off main and merge conflict fixed.

Tweaked with discussed changes and added endian compat functions to win32Bigfilesystems for generals and zero hour along with stdbigfilesystem.

Should be good to go now.

@xezon
Copy link

xezon commented May 6, 2025

VC6 does not like the variadic macro. Then we need to do #define static_assert(a,b) and we settle on static asserts always requiring 2 arguments for now.

@Mauller
Copy link
Author

Mauller commented May 6, 2025

VC6 does not like the variadic macro. Then we need to do #define static_assert(a,b) and we settle on static asserts always requiring 2 arguments for now.

Yeah i just noticed this, was just about to change it, should be up in a few seconds.

@Mauller Mauller force-pushed the bswap-intrinsics branch 2 times, most recently from 8759381 to 615da66 Compare May 6, 2025 18:12
@Mauller
Copy link
Author

Mauller commented May 6, 2025

Now it doesn't like long long, this is taking a long long time. i should really sort my local VC6 build environment lol.

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@Mauller Mauller force-pushed the bswap-intrinsics branch from 615da66 to 06d6f69 Compare May 6, 2025 18:29
@Mauller
Copy link
Author

Mauller commented May 6, 2025

Looks good.

It would seem that VC6 doesn't like the helper templates

EDIT: Figured it out, VC6 doesn't support #pragma once and i didn't include traditional header guards.

EDIT2: Nvm wasn't that...

@Mauller Mauller force-pushed the bswap-intrinsics branch from 06d6f69 to 49836cb Compare May 6, 2025 19:01
@Mauller Mauller force-pushed the bswap-intrinsics branch 2 times, most recently from 1aada72 to 8fe7c1e Compare May 6, 2025 19:50
@Mauller Mauller force-pushed the bswap-intrinsics branch from 8fe7c1e to 497f7af Compare May 6, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Severity: Minor < Major < Critical < Blocker Refactor Improves the structure of the code, with negligible changes in function. ZeroHour Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants