i am not familiar with this specific function, what are the differences to the normal strcasecmp? if the arguments are in the same order i probably could craft a sed command to change all offending files
Reply To dark-ether
what are the differences to the normal strcasecmp?
Most fc_...() replacements have originally been introduced for being more portable (often just wrappers for the "real" function of the platform), or more secure (hardened).
This specific one has since been converted to use icu -> it's utf8 aware.
Reply To cazfi
Reply To dark-ether
what are the differences to the normal strcasecmp?
Most fc_...() replacements have originally been introduced for being more portable (often just wrappers for the "real" function of the platform), or more secure (hardened). This specific one has since been converted to use icu -> it's utf8 aware.
i looked at how fc_strcasecmp and strcasecmp were called and they appeared to be equal so i just used ripgrep and sed to find and modify the uses.
I think we would want to change the cvercmp ones too despite it having an upstream separate from freeciv - the way it's part of freeciv build process, linked in statically, and uses it with freeciv provided strings, assumes such compatibility.
Can you also provide patch for all branches where this is expected (S3_0, S3_1, master)? If you have branches set up as separate git worktrees it should be quite trivial.
Reply To cazfi
I think we would want to change the cvercmp ones too despite it having an upstream separate from freeciv - the way it's part of freeciv build process, linked in statically, and uses it with freeciv provided strings, assumes such compatibility. Can you also provide patch for all branches where this is expected (S3_0, S3_1, master)?
Ping
Reply To cazfi
I think we would want to change the cvercmp ones too despite it having an upstream separate from freeciv
Attached versions have that change, and porting S3_0 required also some other changes.
grep -r "strcasecmp" . | grep -v "fc_strcasecmp"