-
Notifications
You must be signed in to change notification settings - Fork 74
Declare ptraddr_t in (sys/)stddef.h and not in stdint.h #2495
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: dev
Are you sure you want to change the base?
Conversation
| #include <stdio.h> | ||
| #include <stddef.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.
| #include <stdio.h> | |
| #include <stddef.h> | |
| #include <stddef.h> | |
| #include <stdio.h> |
But please don't just patch the subrepo
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.
I'll make this a separate do-no-merge commit and pull it before merging.
| typedef size_t __ptraddr_t; | ||
| #endif | ||
| typedef __ptraddr_t ptraddr_t; | ||
| typedef size_t ptraddr_t; |
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.
If our sys/types.h doesn't define it then OpenZFS's shouldn't really either...
66b8743 to
f5b66e0
Compare
It has been deprecated for some time and replaced by ptraddr_t.
f5b66e0 to
cff346a
Compare
This function is only used in freebsd64_signal.c so move it there. This avoids the need for ptraddr_t to be declared in sys/signal.h.
We don't have a defintion guard for __ptraddr_t and indentical redefinitions aren't allowed in C99 to just define ptraddr_t as size_t if needed. This will be fine on any architecture OpenZFS supports.
Stick to stddef.h like ptrdiff_t.
cff346a to
a24ec20
Compare
We need to pick one place for ptraddr_t and I've upstreamed it to stddef.h matching the various CHERI LLVM ports. I've removed the definition from stdint.h and removed the long unused vaddr_t while here.