Opened 8 years ago

Closed 5 years ago

#6508 closed enhancement (wontfix)

API: Can we drop the ifdef for VSIL_STRICT_ENFORCE and just always have it be the struct?

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

What drawbacks, if any are there to just going with what is within the VSIL_STRICT_ENFORCE?

  • cpl_vsi.h

    svn diff cpl_vsi.h
     
    124124typedef GUIntBig vsi_l_offset;
    125125#define VSI_L_OFFSET_MAX GUINTBIG_MAX
    126126
    127 /* Make VSIL_STRICT_ENFORCE active in DEBUG builds */
    128 #ifdef DEBUG
    129 #define VSIL_STRICT_ENFORCE
    130 #endif
    131 
    132 #ifdef VSIL_STRICT_ENFORCE
    133127typedef struct _VSILFILE VSILFILE;
    134 #else
    135 typedef FILE VSILFILE;
    136 #endif
    137128
    138129VSILFILE CPL_DLL *  VSIFOpenL( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
    139130VSILFILE CPL_DLL *  VSIFOpenExL( const char *, const char *, int ) CPL_WARN_UNUSED_RESULT;

Change History (3)

comment:1 by Even Rouault, 8 years ago

It has 2 impacts : it slightly changes the C++ ABI (OK), and could potentially cause compilation issues for external code (since GDAL code must be OK now) that would use FILE* when using VSIFOpenL(). This should be documented in the MIGRATION_GUIDE.

comment:2 by Even Rouault, 6 years ago

Summary: Can we drop the ifdef for VSIL_STRICT_ENFORCE and just always have it be the struct?API: Can we drop the ifdef for VSIL_STRICT_ENFORCE and just always have it be the struct?

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.