Thanks Mirek, I just tried that and it worked! To get around that issue, I did update my code to make use of the trim ends function that U++ has available. I do think undefining things is probably not a recommended solution, I couldn't possibly think of what else could go wrong.
I have actually replaced that macro with inline function in the trunk, so very likely it will work without that #undef witht the trunk for now.
(That said, I am not yet sure whether this change is OK, it is possible I will be forced to remove yet to maintain compatibility).