[GRASS-dev] Re: [GRASS GIS] #1131: Global LFS for wingrass

GRASS GIS trac at osgeo.org
Tue Aug 17 02:46:24 EDT 2010


#1131: Global LFS for wingrass
--------------------------+-------------------------------------------------
 Reporter:  mmetz         |       Owner:  grass-dev@…              
     Type:  defect        |      Status:  new                      
 Priority:  critical      |   Milestone:  7.0.0                    
Component:  libgis        |     Version:  svn-trunk                
 Keywords:  LFS,wingrass  |    Platform:  MSWindows 7              
      Cpu:  All           |  
--------------------------+-------------------------------------------------

Comment(by mmetz):

 Replying to [comment:14 glynn]:
 > Replying to [comment:13 mmetz]:
 > {{{
 > #define lseek lseek64
 > }}}
 > >
 > > does not work with old names in use, compiler error because
 <grass/config.h> needs to be included before all others.
 >
 > Can you provide details?
 >
 go to lib/gis, make

 {{{
 In file included from c:/OSGeo4W/include/fcntl.h:20,
                  from copy_dir.c:24:
 c:/OSGeo4W/include/io.h:299: error: conflicting types for 'lseek64'
 c:/OSGeo4W/include/io.h:164: error: previous definition of 'lseek64' was
 here
 c:/OSGeo4W/include/io.h:299: error: conflicting types for 'lseek64'
 c:/OSGeo4W/include/io.h:164: error: previous definition of 'lseek64' was
 here
 }}}

 same for stat:
 {{{
 In file included from copy_dir.c:28:
 c:/OSGeo4W/include/sys/stat.h:122: error: redefinition of `struct
 _stati64'
 make: *** [OBJ.i686-pc-mingw32/copy_dir.o] Error 1
 }}}
 This error disappears if
 {{{
 #define stat _stati64
 }}}
 is changed and stat is given a unique name (I used _g_stat).

 {{{
 typedef off64_t _off_t;
 typedef off64_t off_t;
 }}}

 (_off_t is also needed) gives
 {{{
 c:/OSGeo4W/usr/src/grass-7.0.svn/dist.i686-pc-
 mingw32/include/grass/config.h:298: error: syntax error before "_off_t"
 c:/OSGeo4W/usr/src/grass-7.0.svn/dist.i686-pc-
 mingw32/include/grass/config.h:298: warning: type defaults to `int' in
 declaration of `_off_t'
 }}}
 because <sys/types.h> is not available, but if it would be available,
 there would be conflicts with off_t.

 {{{
 #define _OFF_T_
 #define _off_t off64_t
 #define off_t off64_t
 }}}
 works. A defined _OFF_T_ tells <sys/types.h> to not typedef off_t

 Markus M

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1131#comment:15>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list