summaryrefslogtreecommitdiffstats
path: root/src/basic/generate-af-list.sh
blob: 5bf244c49d1f58dc04fbae2012c6bb77f806ec74 (plain)
1
2
3
4
5
6
#!/bin/sh
set -eu

$1 -E -dM -include sys/socket.h -include "$2" -include "$3" - </dev/null | \
        grep -Ev 'AF_UNSPEC|AF_MAX' | \
        awk '/^#define[ \t]+AF_[^ \t]+[ \t]+[AP]F_[^ \t]/ { print $2; }'