[Gdal-dev] gdal build on solaris

Andrey Kiselev dron at ak4719.spb.edu
Fri Sep 26 16:29:46 EDT 2003


On Thu, Sep 25, 2003 at 03:03:47PM -0400, Gillian Walter wrote:
> Configure seems to be a little bit broken for solaris.  I had to add
> "-D_REENTRANT" manually to CXX_OPTFLAGS and C_OPTFLAGS in GDALmake.opt
> after running configure before it would make: on our solaris machine,
> localtime_r (in time.h) is bracketed by:
> 
> #if    defined(__EXTENSIONS__) || defined(_REENTRANT) ||
> (_POSIX_C_SOURCE - 0 >= 199506L)
> 
> This localtime_r function is used by VSILocalTime in cpl_vsisimple.cpp
> if HAVE_LOCALTIME_R is set to 1 during configure (it is on solaris).
> I'm not sure if REENTRANT was the right define to add though, or if
> configure should have not set HAVE_LOCALTIME_R at all (when I added
> the REENTRANT it compiled, but I don't know if it will have weird side
> effects). 

Gillian,

localtime_r() is a thread safe variant of the localtime() function and
it is defined in glibc without any additional conditions. I haven't
access to the Solaris box, but I can add -D_REENTRANT to the compiling
flags when HAVE_LOCALTIME_R will be switched on.

					Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list