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

chore: fix missing includes of cstdint #93

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

theHamsta
Copy link
Contributor

@theHamsta theHamsta commented Sep 30, 2023

Thank you for this awesome library!

I had a small problem when compiling using clang. This fixes compilation of this library using clang++-18 on Ubuntu 23.10 where it was missing a few includes of <cstdint>.

Please let me know whether you prefer <cstdint> or the deprecated <stdint.h>. At least in one of the cases <cstdint> has to be used to provide std::unt32_t definitions. <cstdint> does not define ::uint32_t as defined by the C++, only std::uint32_t but in practice it also defines::uint32_t for all implementation that I'm aware of.

@@ -26,6 +26,7 @@
#include <limits>
#include <memory>
#include <stack>
#include <cstdint>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you help me from which library this is coming from to provide a fix upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

std::uint32_t is used in line 131

Copy link
Collaborator

@syoyo syoyo Sep 30, 2023

Choose a reason for hiding this comment

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

Thanks PR! staticstruct is now legacy and not used in tinyusdz. We should remote staticstruct. Let me give some time to work on removing it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI staticstruct git repo is here: https://github.com/syoyo/staticstruct

@syoyo
Copy link
Collaborator

syoyo commented Oct 1, 2023

Thanks!

I have removed staticstruct dependency, so please use the recent dev branch.

I think we should go with <cstdint>(C++11 or later compliant)

does not define ::uint32_t as defined by the C++, only std::uint32_t but in practice it also defines::uint32_t for all implementation that I'm aware of.

Good to know!

This fixes compilation of this library using clang++-18 on Ubuntu 23.10.
@theHamsta
Copy link
Contributor Author

Rebased onto newest dev branch

@syoyo syoyo merged commit 9305364 into lighttransport:dev Oct 3, 2023
20 checks passed
@syoyo
Copy link
Collaborator

syoyo commented Oct 3, 2023

Thanks! Merged!

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.

2 participants