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

Additionally check __LONG_MAX__ for defining curl_off_t. #2216

Closed
wants to merge 1 commit into from

Conversation

@jimis
Copy link
Contributor

commented Jan 4, 2018

__SIZEOF_LONG__ was introduced in GCC 4.4, __LONG_MAX__ was introduced
in GCC 3.3.

Additionally check __LONG_MAX__ for defining curl_off_t.
__SIZEOF_LONG__ was introduced in GCC 4.4, __LONG_MAX__ was introduced
in GCC 3.3.
@jimis

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2018

An alternative to #2214.

@jimis

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2018

The one test build that failed is spurious?

EDIT: oh it looks green now, probably somebody triggered it again.

@bagder
bagder approved these changes Jan 9, 2018
Copy link
Member

left a comment

I think this looks fine and safe!

@bagder

This comment has been minimized.

Copy link
Member

commented Jan 9, 2018

Thanks!

@jay

This comment has been minimized.

Copy link
Member

commented Jan 9, 2018

I think that this could warn warning: integer constant is too large for its type for generic gcc that doesn't support 9223372036854775807L. This would probably suppress it:

#if defined(__LONG_MAX__) && (__LONG_MAX__ > 2147483647L)
#  if (__LONG_MAX__ == 9223372036854775807L)
#    define CURL_PROBABLY_64_LONG
#  endif
#endif

and then later in the elif for lp64 where the check is now instead check if CURL_PROBABLY_64_LONG is defined
It seems kind of messy though

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.