Opened 12 years ago

Closed 12 years ago

#2500 closed defect (fixed)

Compilation fails on WIN32 due to recent changes in AVC driver

Reported by: Even Rouault Owned by: Daniel Morissette
Priority: high Milestone: 1.6.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: AVC WIN32
Cc: warmerdam, Mateusz Łoskot



you can see

avc_e00read.c(115) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directore

This is due to the fact that the #ifdef WIN32 is done before including CPL headers.

#ifdef WIN32
#  include <direct.h>   /* getcwd() */
#  include <unistd.h>   /* getcwd() */

WIN32 is defined by cpl_port.h if _WIN32 is defined. So the fix is either to use _WIN32 or include cpl_port.h before

/* ==================================================================== */
/*      We will use WIN32 as a standard windows define.                 */
/* ==================================================================== */
#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE)
#  define WIN32

#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE)
#  define WIN32

Change History (2)

comment:1 Changed 12 years ago by Even Rouault

Owner: changed from danmo to Daniel Morissette

I'm always confused by the difference between IRC logins and Trac ID...

comment:2 Changed 12 years ago by Daniel Morissette

Resolution: fixed
Status: newclosed

Fixed upstream and in r15026

Note: See TracTickets for help on using tickets.