Skip to content

Conversation

@brooksdavis
Copy link
Member

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.

Comment on lines 17 to 18
#include <stdio.h>
#include <stddef.h>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#include <stdio.h>
#include <stddef.h>
#include <stddef.h>
#include <stdio.h>

But please don't just patch the subrepo

Copy link
Member Author

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;
Copy link
Member

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...

It has been deprecated for some time and replaced by ptraddr_t.
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.
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