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

@jimis jimis commented Jan 4, 2018

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

__SIZEOF_LONG__ was introduced in GCC 4.4, __LONG_MAX__ was introduced
in GCC 3.3.
@jimis
Copy link
Contributor Author

jimis commented Jan 4, 2018

An alternative to #2214.

@jimis
Copy link
Contributor Author

jimis commented Jan 8, 2018

The one test build that failed is spurious?

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

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

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

I think this looks fine and safe!

@bagder
Copy link
Member

bagder commented Jan 9, 2018

Thanks!

@jay
Copy link
Member

jay 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.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants