On Mon, May 09, 2016 at 11:50:10AM -0500, Derek Martin wrote:
> On Sun, May 08, 2016 at 12:33:27PM -0700, Kevin J. McCarthy wrote:
> > > I did confirm that there were no conflicts, and the patch applies
> > > cleanly to 1.6.1.  I'm composing this e-mail from the patched version
> > > now. =8^)
> > 
> > Thanks a lot for doing this, Derek.  Do you have the script you used for
> > this?   I wonder if we should put it somewhere, so external packagers
> > and use it on patches if needed.
> 
> I did not really use a script, per se.  For the safety check, I used
> the following sequence of commands:
> 
> $ find . -name "*.[ch]" -exec grep -Ro '\WM_\w\+' {} \; |sed 
> 's/^\W*M_/MUTT_/' |sort -u > symbols
> $ mv symbols ..
> $ cat ../symbols | while read pattern; do echo "$pattern:"; if grep -Rlw 
> "$pattern" .; then  echo "Symbol \"$pattern\" is unsafe"; fi; done

Good.

> Then, to make the changes, I used the perl command posted by Andras:
> 
> $ perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`

Okay, I'm adding the perl fragment to the commit message.  Whenever we
do the next default-branch release, I think we'll need to give a
heads-up and perhaps some assistance to downstream.  This script is easy
enough to use on patches too.

> I did of course test that the patch applied cleanly to a pristine
> third copy of the source.

I rebased your patch against default tip, and also verified it against
a manual run of the perl script myself.  It looks good.

Unless there are any objections, I will push this along with the backout
of 23334e967dd7 "Create a wrapper sys_socket.h to work around Solaris
namespace issues." later today.

Thanks again, Derek and Andras!

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to