Opened 10 years ago

Closed 10 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:


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:

I have tested the above in MinGW and it works.

Change History (3)

comment:1 Changed 10 years ago by Even Rouault

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 Changed 10 years ago by Ari Jolma

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

comment:3 Changed 10 years ago by Even Rouault

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