Ticket #3781 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: ajolma 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

Changed 3 years ago by 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

Changed 3 years ago by ajolma

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

Changed 3 years ago by rouault

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.