-
Couldn't load subscription status.
- Fork 214
include/woff2/output.h: add missing <stdint.h> include #176
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
base: master
Are you sure you want to change the base?
Conversation
include/woff2/output.h
Outdated
| #include <algorithm> | ||
| #include <cstring> | ||
| #include <memory> | ||
| #include <stdint.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to follow
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Changed to the following:
--- a/include/woff2/output.h
+++ b/include/woff2/output.h
@@ -9,10 +9,11 @@
#ifndef WOFF2_WOFF2_OUT_H_
#define WOFF2_WOFF2_OUT_H_
+#include <stdint.h>
+
#include <algorithm>
#include <cstring>
#include <memory>
-#include <stdint.h>
#include <string>
namespace woff2 {Without the change `woff2` build fails on upcoming `gcc-15` as:
In file included from src/woff2_out.cc:9:
include/woff2/output.h:73:25: error: expected ')' before '*' token
73 | WOFF2MemoryOut(uint8_t* buf, size_t buf_size);
| ~ ^
| )
include/woff2/output.h:79:3: error: 'uint8_t' does not name a type
79 | uint8_t* buf_;
| ^~~~~~~
include/woff2/output.h:16:1: note: 'uint8_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
15 | #include <string>
+++ |+#include <cstdint>
16 |
3905a7d to
08ece78
Compare
|
@rsheeter could you merge this? This is also necessary for chromium build experimenting C++ modules. |
|
@rsheeter Friendly ping - could you please have a look? It would help us a lot, thank you! 😊 |
This is to fix build error when we set use_libcxx_modules=true. I made this as local modification due to the owner of woff2 doesn't respond to merge google/woff2#176. Bug: 40263312 Change-Id: Ie0e35f3b60382c278a9fccdc0b7de4db55447acc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6196756 Reviewed-by: Kenichi Ishibashi <[email protected]> Commit-Queue: Kenichi Ishibashi <[email protected]> Auto-Submit: Takuto Ikuta <[email protected]> Cr-Commit-Position: refs/heads/main@{#1410760}
Without the change
woff2build fails on upcominggcc-15as: