summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shared.c
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2014-08-18 16:26:34 -0700
committerCarl Worth <[email protected]>2014-08-20 16:42:46 -0700
commitf90b7e0f2bee56af22edeebfea292ab960ce0628 (patch)
treeca2f16d746e45fd8d0d4c7cc14d06a95d5f716cb /src/mesa/main/shared.c
parentc09a8b0e3bb93906f59fee565eb22d37b91fbfaf (diff)
glcpp: Fix glcpp-test-cr-lf "make check" test for Mac OS X
There were two problems with the way this script used sed on OS X: 1. The OS X sed doesn't interpret "\r" in a replacement list as a carriage-return character, (instead it was inserting a literal 'r' character). We fix this by putting an actual ^M character into the source of the script, (rather than a two-character escape sequence hoping for sed to do the right thing). 2. When generating the test files with LF-CR ("\n\r") newlines, the OS X sed was adding an undesired final newline ("\n") at the end of the file. We avoid this by first using sed to add the ^M before the newlines, then using tr to swap the \r and \n characters. This way, sed never sees any lines ending with anything but \n, so it doesn't get confused and doesn't add any bogus extra newlines. Tested-by: Vinson Lee <[email protected]> Vinson's testing confirmed that this patch fixes FreeBSD as well.
Diffstat (limited to 'src/mesa/main/shared.c')
0 files changed, 0 insertions, 0 deletions