view ifndef_wrapper.sh @ 1623:c66c49ebf77d

Remove incorrect _POSIX_C_SOURCE
author Matt Johnston <matt@ucc.asn.au>
date Tue, 06 Nov 2018 07:25:53 +0800
parents 0196f4f83fee
children
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
\1\
#endif/'