Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid 'z' format with MSVCRT (#1559)
### Issues: * aws/aws-lc-rs#413 ### Description of changes: * Some versions of MinGW complain about use of `z` in a format specification: https://stackoverflow.com/questions/44382862/how-to-printf-a-size-t-without-warning-in-mingw-w64-gcc-7-1 * This problem relates to a claim that the Windows C-Runtime ("msvcrt") only supports C89 format strings. However, this appears to have been addressed by (or before) MSVC 2015: https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-140#size-prefixes-for-printf-and-wprintf-format-type-specifiers ### Testing: With this change I was able to successfully cross-compile to x86_64-pc-windows-gnu: ``` ❯ cross build -p aws-lc-rs --features bindgen --target x86_64-pc-windows-gnu ... Compiling aws-lc-sys v0.16.0 (/Users/justsmth/repos/aws-lc-rs/aws-lc-sys) warning: [email protected]: Generating bindings - internal bindgen. Platform: x86_64-pc-windows-gnu Compiling aws-lc-rs v1.7.1 (/Users/justsmth/repos/aws-lc-rs/aws-lc-rs) Finished dev [unoptimized + debuginfo] target(s) in 29.94s ``` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
- Loading branch information