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

Wrapping all <inttypes.h> includes with __STDC_FORMAT_MACROS #99

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

darylmartin100
Copy link
Contributor

@darylmartin100 darylmartin100 commented Feb 23, 2021

Issues:

Resolves: CryptoAlg-672

Description of changes:

On older systems supported by aws-c-cal, gcc 4.8.2, we run into compilation errors when building our test code. It turns out that some of the defines in inttypes are only defined if you specify __STDC_FORMAT_MACROS before including inttypes.h.

The change is very simple, add the __STDC_FORMAT_MACROS to each include to ensure it's always defined.

/root/aws-c-cal/build/deps/aws-lc/ssl/test/bssl_shim.cc: In function bool CheckHandshakeProperties(SSL*, bool, const TestConfig*):
/root/aws-c-cal/build/deps/aws-lc/ssl/test/bssl_shim.cc:659:45: error: expected ) before PRId32
     fprintf(stderr, "Ticket age skew was %" PRId32 ", wanted %d\n",
                                             ^
/root/aws-c-cal/build/deps/aws-lc/ssl/test/bssl_shim.cc:660:73: error: spurious trailing % in format [-Werror=format=]
             SSL_get_ticket_age_skew(ssl), config->expect_ticket_age_skew);

Call-outs:

N/A

Testing:

This change was tested on a branch with aws-c-cal's CI. The CI did run and successfully build with the above changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…e with include inttypes.h on older compilers (4.8.2)
@torben-hansen
Copy link
Contributor

Did you consider defining it in base.h?

@darylmartin100
Copy link
Contributor Author

Did you consider defining it in base.h?

base.h isn't included in all of the files I modified, look at obj.c. I didn't want to start changing the include order so I wrapped all 8 includes instead.

@darylmartin100 darylmartin100 merged commit 6566103 into main Feb 23, 2021
@torben-hansen torben-hansen deleted the topic/inttypes_fix branch September 26, 2021 03:07
@torben-hansen torben-hansen restored the topic/inttypes_fix branch September 26, 2021 03:07
@dkostic dkostic deleted the topic/inttypes_fix branch November 8, 2021 19:12
aqjune-aws added a commit to aqjune-aws/aws-lc-public that referenced this pull request Mar 4, 2024
…_input_const

Make _input_ parameter to ed25519 decode function const
s2n-bignum original commit: awslabs/s2n-bignum@4097178
dkostic pushed a commit to dkostic/aws-lc that referenced this pull request Jul 22, 2024
…_input_const

Make _input_ parameter to ed25519 decode function const
s2n-bignum original commit: awslabs/s2n-bignum@4097178
torben-hansen pushed a commit to torben-hansen/aws-lc that referenced this pull request Sep 18, 2024
…_input_const

Make _input_ parameter to ed25519 decode function const
s2n-bignum original commit: awslabs/s2n-bignum@4097178
torben-hansen pushed a commit to torben-hansen/aws-lc that referenced this pull request Sep 18, 2024
…_input_const

Make _input_ parameter to ed25519 decode function const
s2n-bignum original commit: awslabs/s2n-bignum@4097178

s2n-bignum original commit: awslabs/s2n-bignum@dc716ed
torben-hansen pushed a commit to torben-hansen/aws-lc that referenced this pull request Sep 19, 2024
…_input_const

Make _input_ parameter to ed25519 decode function const
s2n-bignum original commit: awslabs/s2n-bignum@4097178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants