view ifndef_wrapper.sh @ 1669:3080aed32bf1

scp.c: Port OpenSSH CVE-2018-20685 fix (#80)
author Haelwenn Monnier <contact+github.com@hacktivis.me>
date Mon, 25 May 2020 14:54:29 +0200
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/'