Ticket #2500 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Compilation fails on WIN32 due to recent changes in AVC driver

Reported by: rouault Owned by: dmorissette
Priority: high Milestone: 1.6.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: AVC WIN32
Cc: warmerdam, mloskot

Description

In  http://buildbot.osgeo.org:8500/builders/szekerest-vc80-full/builds/21/steps/nmake/logs/stdio

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() */
#else
#  include <unistd.h>   /* getcwd() */
#endif

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
#endif

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

Change History

Changed 5 years ago by rouault

  • owner changed from danmo to dmorissette

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

Changed 5 years ago by dmorissette

  • status changed from new to closed
  • resolution set to fixed

Fixed upstream and in r15026

Note: See TracTickets for help on using tickets.