Skip to content

Use LONG_BIT to define RADIX_BITS#16

Open
ffontaine wants to merge 1 commit into
kgoldman:masterfrom
ffontaine:master
Open

Use LONG_BIT to define RADIX_BITS#16
ffontaine wants to merge 1 commit into
kgoldman:masterfrom
ffontaine:master

Conversation

@ffontaine

@ffontaine ffontaine commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

This allows to avoid having to support each CPU architecture individually.

Also, add the necessary defines in the makefile to expose LONG_BIT. Adding those defines end up requiring using <sys/select.h> as we're now using >= POSIX.1-2001 definitions of fd_set and friends.

This allows to avoid having to support each CPU architecture
individually.

Also, add the necessary defines in the makefile to expose
LONG_BIT. Adding those defines end up requiring using <sys/select.h>
as we're now using >= POSIX.1-2001 definitions of fd_set and friends.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@ffontaine

Copy link
Copy Markdown
Contributor Author

This is a tentative to upstream this patch which has been applied on buildroot side since 2020: https://git.buildroot.net/buildroot/tree/package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch

@kgoldman kgoldman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Am I correct that this is Linux only, that the header file and macro don't exist on Windows and perhaps other platforms that are currently supported?

I like the idea, but I don't want to break non-Linux builds.

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.

3 participants