'Including C headers from assembly

I've been writing assembly on linux for a while and I often find myself in need of including C headers which contain macro, enum and struct definitions (but clearly I just care about the macros). So, what I usually do is writing something like:

.if 0
#include <errno.h>
#include <fcntl.h>
...
.endif

Doing this I have no problem and the code compiles correctly.

Is there a more elegant way?

P.S. I wouldn't like to use cc -dM on those headers before including them



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source