On 20/02/17 14:03, Gert Doering wrote: > Hi, > > On Wed, Jan 25, 2017 at 09:53:02PM +0100, David Sommerseth wrote: >> This tool depends on a cloned upstream LZ4 git repository and a >> checked out release tag. Then run the script like this: >> >> $ ./dev-tools/lz4-rebaser.sh /path/to/lz4.git >> >> To see the result before committing, use: git diff --cached > > All willing to give this an ACK, alas, it's penguin-tainted :-) - read, > won't work with a FreeBSD sed. > >> +#ifdef NEED_COMPAT_LZ4 >> +EOF >> + sed '/"lz4\.h"/s/\(#include "\)lz4\.h\("\+\)/\1compat-lz4.h\2/' "$LZ4_C" >> +cat <<EOF > > Not sure why this is not working here, but it looks like having too > much bells and whistles :-9 - I replaced this with > > sed 's/\"lz4\.h\"/\"compat-lz4.h"/' "$LZ4_C" > > and ran it against a local copy of lz4 v131, and that produced the > expected result - no significant changes to compat-lz4.c/compat-lz4.h > (the "#ifdef HAVE_CONFIG_H" block moves to the top of the file, but > that is purely cosmetic - the block itself is fine)
I /did/ consider to do some clever sed hacks here too ... but I wasn't in mood for that complexity, and I actually feared how *BSD would explode in my face :) But as it turned out, the BSD explosion trigger was even lower than that ....... ;-) > So, any objections against the much simpler sed command there? "lz4.h" > with double quotes never shows up elsewhere in the file today - and > when importing, we need to run a compile test anyway, so if it should > ever garble the .c file, we fix the script... This is purely my "match a precise as possible" approach I default to. I have no issues making this simpler if that is what is required. New patch or fix at commit time? -- kind regards, David Sommerseth OpenVPN Technologies, Inc
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel