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

GRASS GIS trac at osgeo.org
Fri Jun 14 13:12:31 PDT 2013

#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:19 glynn]:
 > Replying to [comment:18 mmetz]:
 > > I have modified the configure tests such that any switches needed for
 LFS are stored as LFS_CFLAGS. Tests show that on Linux 64 bit, nothing is
 > That's probably correct; fseeko and ftello are guarded by:
 #if defined __USE_LARGEFILE || defined __USE_XOPEN2K
 > !__USE_LARGEFILE is implied by _XOPEN_SOURCE >= 500, while
 !__USE_XOPEN2K is implied by _POSIX_C_SOURCE >= 200112. If you don't have
 one of those two, you'll probably have other issues besides fseeko/ftello
 (e.g. M_PI, SA_RESTART).

 From the autoconf comments, same in our aclocal.m4:
 "We used to try defining _XOPEN_SOURCE=500 too, to work around a bug in
 glibc 2.1.3, but that breaks too many other things. If you want fseeko and
 ftello with glibc, upgrade to a fixed glibc."
 > Aside: if you're testing for compatibility, start by adding -ansi or
 -std=c89 to CFLAGS, then add the minimum set of feature macros. The
 default is -std=gnu89, which enables practically all of the extensions
 > About the only feature which isn't enabled by default is _BSD_SOURCE,
 which not only enables BSD extensions but favours them over the SysV
 versions (e.g. both BSD and SysV define getpgrp() and setpgrp(), but the
 BSD versions take arguments while the SysV versions don't).

 So far everything is working fine for me on the systems available to me
 (Redhat-based Linux 32 and 64 bit, Solaris 10, 11 32 bit, *BSD 32 and 64
 bit), therefore I would not add new features unless they are required. For
 example, if you define _BSD_SOURCE, "you must give the option ‘-lbsd-
 compat’ to the compiler or linker when linking the program, to tell it to
 find functions in this special compatibility library before looking for
 them in the normal C library", says the glibc documentation.

 AIX is a problem, also with regard to 64 bit AIX, it insists on using a 32
 bit off_t and corresponding functions. Setting -D_LARGE_FILES is
 apparently not enough, even though the official documentation says it
 should suffice. I need to analyse the errors in more detail before I can
 give useful information on the particulars for LFS on AIX.

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

More information about the grass-dev mailing list