summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2016-09-08 08:08:15 -0400
committerNiels de Vos <ndevos@redhat.com>2016-09-12 02:13:38 -0700
commite002798e8f85b67d67d34326b32f838541827bc5 (patch)
treee81532beef88cdeb2621e6c67cec519e9d73a38a
parent266ca69d01c8ee7ca04087ced234cf5e392b754a (diff)
rpc/xdr: use ordinary regex to sed filter generated files
Versus an extended regex While NetBSD and FreeBSD's sed has compat -r command line option, Mac OS X's sed does not. And there's no need to use an extended regex here; avoiding extra logic to determine whether running on Linux or *BSD. Change-Id: I6089f994f6c4f50eb353fc018b1b678ec93d6626 BUG: 1374280 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/15429 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rwxr-xr-xbuild-aux/xdrgen2
1 files changed, 1 insertions, 1 deletions
diff --git a/build-aux/xdrgen b/build-aux/xdrgen
index 010df656377..2d808d235ec 100755
--- a/build-aux/xdrgen
+++ b/build-aux/xdrgen
@@ -75,7 +75,7 @@ gen_headers ()
rm -f $hfile;
rpcgen -h -o $hfile $xfile;
# the '#ifdef' part of file should be fixed
- sed -r -e '/#(ifdef|ifndef|define)/s/-/_/g' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;
+ sed -e '/#ifndef/ s/-/_/g' -e '/#define/ s/-/_/g' -e '/#endif/ s/-/_/' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;
# Gen header to temp file and append generated file
append_licence_header $hfile $tmp_hfile;
# now move the destination file to actual original file