This is an archive of the discontinued LLVM Phabricator instance.

Using __isascii (POSIX) instead of isascii (deprecated).
AbandonedPublic

Authored by curdeius on Sep 4 2014, 2:17 AM.

Details

Reviewers
samsonov
Summary

Newer MinGW versions fail with a linker error because of undefined reference to isascii.
This function is deprecated and __isascii (POSIX conformant) should be used.

See: http://msdn.microsoft.com/fr-fr/library/5wcd48xw.aspx
See: http://stackoverflow.com/questions/19564168/how-can-solve-undefined-reference-to-isascii-when-build-openocd-in-win-7-cy

Diff Detail

Event Timeline

curdeius updated this revision to Diff 13241.Sep 4 2014, 2:17 AM
curdeius retitled this revision from to Using __isascii (POSIX) instead of isascii (deprecated)..
curdeius updated this object.
curdeius edited the test plan for this revision. (Show Details)
curdeius added a subscriber: curdeius.
curdeius updated this object.Sep 4 2014, 2:21 AM
curdeius added a subscriber: Unknown Object (MLST).
rengolin edited edge metadata.Sep 7 2014, 11:37 AM

Hi,

Looks harmless enough. Have you tested on non-Windows platforms?

cheers,
--renato

thakis added a subscriber: thakis.Sep 7 2014, 1:21 PM

This directory contains https://code.google.com/p/googletest/ . I think the way to go about changing it is to get the change merged upstream, and then update this directory to what's in the upstream repo (?)

In D5185#6, @rengolin wrote:

Looks harmless enough. Have you tested on non-Windows platforms?

Not yet, but I'll do this soon.

Tested on Arch Linux with GCC 4.9.1 and Clang 3.5.0, works fine.

In D5185#7, @thakis wrote:

This directory contains https://code.google.com/p/googletest/ . I think the way to go about changing it is to get the change merged upstream, and then update this directory to what's in the upstream repo (?)

I checked the googletest page. The current version does not have this problem, because isascii is not used in 1.7.0.
LLVM uses a slightly modified version 1.6.0, so I see two possibilities:

  1. Update googletest in LLVM to 1.7.0 (However, I do not know the general policy for handling external dependencies in LLVM)
  2. Patch current version (That is what I propose, a short-term solution)
rengolin resigned from this revision.Mar 10 2015, 4:40 AM
rengolin removed a reviewer: rengolin.
curdeius abandoned this revision.Oct 8 2015, 3:29 AM