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

Fixed wrong byte order on big endian platforms (e.g. powerpc). #28

Merged
merged 2 commits into from
Apr 11, 2014

Conversation

manni83
Copy link
Contributor

@manni83 manni83 commented Mar 25, 2014

The ZIP file format is little endian. When using the mod_zip module on big endian platforms, the code did not work (the produced archive was invalid). This code fixes this behavior and was tested on a powerpc Linux platform.

@evanmiller
Copy link
Owner

Hi,

Supporting big endian is a good idea, but I'm afraid endian.h is not cross-platform. Please wrap these calls inside an appropriate #ifdef, or look at the gzip module to see how Nginx handles endianness issues.

@manni83
Copy link
Contributor Author

manni83 commented Apr 11, 2014

I have updated the code to be more cross platform, hope it fits better now.

@evanmiller
Copy link
Owner

Neat, thanks! I'll get this merged in.

evanmiller added a commit that referenced this pull request Apr 11, 2014
Fixed wrong byte order on big endian platforms (e.g. powerpc).
@evanmiller evanmiller merged commit dc3fd28 into evanmiller:master Apr 11, 2014
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.

2 participants