Opened 14 years ago

Closed 14 years ago

#3781 closed defect (fixed)

_MSC_VER is a MS compiler specific way to test for wide function availability in Windows

Reported by: Ari Jolma Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

cpl_vsil_win32.cpp has several

#if defined(WIN32) && _MSC_VER >= 1310

tests for whether wide functions can be used in Windows. This does not work for MinGW, which would require something like

#if defined(WIN32) && __MSVCRT_VERSION__ >= 0x0601

see this email I sent to the list: http://lists.osgeo.org/pipermail/gdal-dev/2010-October/026310.html

I have tested the above in MinGW and it works.

Change History (3)

comment:1 by Even Rouault, 14 years ago

I've modified your proposed changed so that it works with MSVC also, that doesn't define MSVCRT_VERSION

Commited in r20816.

I think that ideally there should be additionnal stuff done so that MSVCRT_VERSION gets automatically defined at 0x0601 by ./configure, perhaps in cpl_config.h. From what I understand of the discussion in the link you give, 0x0600 seems to correspond to an antiquated version of msvcrt.dll

comment:2 by Ari Jolma, 14 years ago

MSVCRT_VERSION is not defined in MinGW/MSYS neither. I'll make a note of that in developer wiki for MinGW users.

comment:3 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.