-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bind 32-bit ints correctly on big endian LP64 systems (#611)
* Bind 32-bit ints correctly on big endian LP64 systems The size of a long on 64-bit Linux, Unix, and other LP64 platforms is 64-bit, so passing the address of it and saying it is a 32-bit integer will result in only the top 4 bytes being read. While this does work on little endian systems, on big endian systems these bytes will always be 0 for values < INT_MAX. Instead, change the type to be an int, which should be 32 bits on all supported platforms. * Fix compiler warnings
- Loading branch information
1 parent
49a9032
commit c3067c7
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters