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

Review architecture specific defines #1152

Open
64 opened this issue Oct 13, 2024 · 2 comments
Open

Review architecture specific defines #1152

64 opened this issue Oct 13, 2024 · 2 comments

Comments

@64
Copy link
Member

64 commented Oct 13, 2024

Some architecture specific defines are really just checking for 32-bit / 64-bit: we should refactor these to directly check for pointer size so new ISA ports require less boilerplate.

e.g

#if defined(__i386__)
DO_TEST("-2147483648", LONG_MIN, -1, strtol, 10);
DO_TEST("2147483647", LONG_MAX, -1, strtol, 10);
DO_ERR_TEST("-2147483649", LONG_MIN, ERANGE, strtol, 10);
DO_ERR_TEST("2147483648", LONG_MAX, ERANGE, strtol, 10);
#else
DO_TEST("-9223372036854775808", LONG_MIN, -1, strtol, 10);
DO_TEST("9223372036854775807", LONG_MAX, -1, strtol, 10);
DO_ERR_TEST("9223372036854775808", LONG_MAX, ERANGE, strtol, 10);
DO_ERR_TEST("-9223372036854775809", LONG_MIN, ERANGE, strtol, 10);
#endif

@VeerChaurasia
Copy link

hey @64 can I take this one?

@64
Copy link
Member Author

64 commented Oct 17, 2024

Sure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants