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

Preprocessing inside {#offsetof #} {#sizeof #} etc #244

Open
valpackett opened this issue Dec 17, 2019 · 0 comments
Open

Preprocessing inside {#offsetof #} {#sizeof #} etc #244

valpackett opened this issue Dec 17, 2019 · 0 comments

Comments

@valpackett
Copy link

linux/input.h uses defines to provide different public aliases for struct fields:

struct input_event {
#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)
	struct timeval time;
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#else
	__kernel_ulong_t __sec;
#if defined(__sparc__) && defined(__arch64__)
	unsigned int __usec;
#else
	__kernel_ulong_t __usec;
#endif
#define input_event_sec  __sec
#define input_event_usec __usec
#endif
	__u16 type;
	__u16 code;
	__s32 value;
};

Unfortunately it doesn't seem like c2hs wants to handle code like {#offsetof input_event->input_event_usec #}

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

No branches or pull requests

1 participant