203690537b
Accept definitions to other AF_ constants, not just PF_ ones, such as: #define AF_LINUX AF_LOCAL It may not be necessary to impose any restriction on the definitions of the macros extracted, but for now keep most of that requirement but match AF_* as well.
7 lines
181 B
Bash
Executable file
7 lines
181 B
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
|
|
$1 -E -dM -include sys/socket.h - </dev/null | \
|
|
grep -Ev 'AF_UNSPEC|AF_MAX' | \
|
|
awk '/^#define[ \t]+AF_[^ \t]+[ \t]+[AP]F_[^ \t]/ { print $2; }'
|