curl/system.h: GCC doesn't define __ppc__ on PowerPC, use __powerpc__ instead #1774

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

alllexx88 commented Aug 13, 2017

There's a mistake in current system,h testing for generic PowerPC GCC. GCC doesn't define __ppc__ for PowerPC arch, but defines __powerpc__ instead. For instance, see here

@alllexx88, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bagder, @MarcelRaad and @tpetazzoni to be potential reviewers.

Owner

bagder commented Aug 13, 2017

Thanks! This may then also call for a bug report to predef.sf.net which says otherwise...

Coverage Status

Coverage increased (+0.1%) to 75.147% when pulling f5be12e on alllexx88:ppc-system-h-fix into 6bde13a on curl:master.

Contributor

alllexx88 commented Aug 13, 2017

I've verified this on two powerpc toolchains. Without this patch I get multiple errors of this kind:

../include/curl/curl.h:174:3: error: unknown type name ‘curl_off_t’

(e.g., see http://jenkins.nas-admin.org/view/Optware/job/Optware_Build_006_buildroot-ppc-603e/389/console)

@bagder bagder closed this in 10b3df1 Aug 13, 2017

Owner

bagder commented Aug 13, 2017

Thanks!

Contributor

alllexx88 commented Aug 13, 2017

You're welcome! Thanks for merging this

@alllexx88 alllexx88 deleted the alllexx88:ppc-system-h-fix branch Aug 13, 2017

bagder added a commit that referenced this pull request Aug 17, 2017

curl/system.h: check for __ppc__ as well
... regression since issue #1774 (commit 10b3df1) since obviously
some older gcc doesn't know __powerpc__ while some newer doesn't know
__ppc__ ...

Fixes #1797
Reported-by: Ryan Schmidt

bagder added a commit that referenced this pull request Aug 18, 2017

curl/system.h: check for __ppc__ as well
... regression since issue #1774 (commit 10b3df1) since obviously
some older gcc doesn't know __powerpc__ while some newer doesn't know
__ppc__ ...

Fixes #1797
Closes #1798
Reported-by: Ryan Schmidt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment