Skip to content

Make standard function available on non-standard platforms

Eric Engestrom requested to merge eric/mesa:u_string-standard-name into master

... instead of making standard platforms use non-standard functions.

This also reduces the likelihood of someone forgetting to use the non-standard function, and reduces the fix to a simple #include.

Changes generated using this shell function for each function name:

fix() {
  files=$(ag -lw util_$1)
  sed s/'\<util_'$1'\>'/$1/g -i $files
  git add -up $files
  git commit -sm 'util: use standard name for '$1'()'
}

Most of it is reviewed by @anholt and @evelikov, but Emil had some suggestions backed by @idr and @jrfonseca which resulted in the first 4 commits and the last commit here.

This has only been tested by doing an AppVeyor build.
I'm not sure whether this covers the minimum supported MSVC version.


This MR interacts a bit with @dbaker's !1250 (closed), will need care when rebasing one over the other.

Specifically, !1250 (closed) starts using util_strcasecmp() which was previously unused and dropped in this MR, so if !1250 (closed) keeps it I'll turn 066b0ddd into a s/util_strcasecmp/strcasecmp/ commit instead.

Edited by Eric Engestrom

Merge request reports

Loading