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

[WIP] fixes in stdlib for -d:checkAbi #13941

Closed

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 10, 2020

[DO NOT REVIEW but discussion welcome]
#13926 needs to be merged first

TODO

Ino* {.importc: "ino_t", header: "<sys/types.h>", unknownSize.} = cuint

which would cause CT sizeof+friends to fail for these

relevant comments to address from #13926

distinct not handled by -d:checkAbi

type
  Time* {.importc: "time_t", header: "<time.h>".} = distinct bool

@@ -140,12 +140,15 @@ type
## used for block sizes
Clock* {.importc: "clock_t", header: "<sys/types.h>".} = int
ClockId* {.importc: "clockid_t", header: "<sys/types.h>".} = int
Dev* {.importc: "dev_t", header: "<sys/types.h>".} = int
Dev* {.importc: "dev_t", header: "<sys/types.h>".} = uint64
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fork this file into posix_linux_i386, or you can adapt posix_linux_amd64 to work for 32bit. I'd say posix_other should just be kept as a template for future OSes.

Also following Linux's definition is not wise, especially since this file is used by many other OS that doesn't have their own dedicated version.

Ideally we need a tool to auto-detect these types (complementary to tools/detect) so that contributors can add support for other POSIX OS faster.

@stale
Copy link

stale bot commented Apr 10, 2021

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Apr 10, 2021
@stale stale bot closed this May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Staled PR/issues; remove the label after fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants