> The UTIL macros have several problematic flaws that may not seem apparent > initially, the worst of which include parsing commas as actual argument > separators to the underlying m4 macros, and completely, but very subtly > wrecking shell constructs. I've done my best here to fix some of these issues > in this commit, so others don't end up suffering like I did while I was > trying to implement [8296478](https://github.com/openjdk/jdk/pull/11020). > Most notably, DESC and CHECKING_MSG should now function correctly when a > comma is included as part of their description strings (Other named arguments > do not yet have this fix implemented, it was simply far too tedious, but it > should be straightforward after this commit to fix those as well). I've also > fixed several bugs that seem to have flown under the radar (Such as > UTIL_DEFUN_NAMED always adding an extra space in between the parameter name > and actual value, even if not required). Majority of the fix involved > UTIL_DEFUN_NAMED, however while it n ow properly passes along arguments it receives to macros that use it to implement their logic, the latter still need to be mindful of macro expansions inside their _own_ body > > > > A couple of limitations from the original implementation still remain: You > still cannot have the parameter specifier inside its own block, for instance > IF_GIVEN: [IF_GIVEN: []] would not work properly (IF_GIVEN: [IF_GIVEN []] > without the colon in the inner string will, however). Additionally, if a > space is not given in between the parameter and its value (Eg DEFAULT:[] > instead of the usual DEFAULT: []) the processing that UTIL_DEFUN_NAMED > performs to correct this problem will still interfere with shell code that > relies on the : token. Unfortunately, despite my best efforts I was unable to > properly resolve these last 2 limitations
Julian Waters has updated the pull request incrementally with one additional commit since the last revision: Remove special ARG_ handling in UTIL_DEFUN_NAMED ------------- Changes: - all: https://git.openjdk.org/jdk/pull/11458/files - new: https://git.openjdk.org/jdk/pull/11458/files/7d38faea..512bf12f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=11458&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11458&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11458.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11458/head:pull/11458 PR: https://git.openjdk.org/jdk/pull/11458