[Ksummit-discuss] Should .c files be discouraged from #including UAPI headers directly?

David Howells dhowells at redhat.com
Wed Aug 6 16:24:21 UTC 2014


Greg KH <greg at kroah.com> wrote:

> Why does it matter?  What works "better" if a .c file doesn't include
> the uapi.h file?

Some of the UAPI headers are 'fixed up' by the non-UAPI header.  In
linux/types.h, for example:

	#define __EXPORTED_HEADERS__
	#include <uapi/linux/types.h>

and linux/acct.h:

	#include <uapi/linux/acct.h>
	...
	#undef ACCT_VERSION
	#undef AHZ

and linux/quota.h:

	#include <uapi/linux/quota.h>
	...
	#undef USRQUOTA
	#undef GRPQUOTA

I don't now remember where they all are:-/

David


More information about the Ksummit-discuss mailing list