Skip to content
Snippets Groups Projects
  • Gaius Mulley's avatar
    e3476ed2
    PR modula2/110779: libgm2 fix solaris bootstrap check for tm_gmtoff · e3476ed2
    Gaius Mulley authored
    
    This patch defensively checks for every C function and every struct
    used in wrapclock.cc.  It adds return values to GetTimespec and
    SetTimespec to allow the module to return a code representing
    unavailable.
    
    gcc/m2/ChangeLog:
    
    	PR modula2/110779
    	* gm2-libs-iso/SysClock.mod (GetClock): Test GetTimespec
    	return value.
    	(SetClock): Test SetTimespec return value.
    	* gm2-libs-iso/wrapclock.def (GetTimespec): Add integer
    	return type.
    	(SetTimespec): Add integer return type.
    
    libgm2/ChangeLog:
    
    	PR modula2/110779
    	* config.h.in: Regenerate.
    	* configure: Regenerate.
    	* configure.ac (AC_CACHE_CHECK): Check for tm_gmtoff field in
    	struct tm.
    	(GM2_CHECK_LIB): Check for daylight, timezone and tzname.
    	* libm2iso/wrapclock.cc (timezone): Guard against absence of
    	struct tm and tm_gmtoff.
    	(daylight): Check for daylight.
    	(timezone): Check for timezone.
    	(isdst): Check for isdst.
    	(tzname): Check for tzname.
    	(GetTimeRealtime): Check for struct timespec.
    	(SetTimeRealtime): Check for struct timespec.
    	(InitTimespec): Check for struct timespec.
    	(KillTimespec): Check for struct timespec.
    	(SetTimespec): Check for struct timespec.
    	(GetTimespec): Check for struct timespec.
    
    Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
    e3476ed2
    History
    PR modula2/110779: libgm2 fix solaris bootstrap check for tm_gmtoff
    Gaius Mulley authored
    
    This patch defensively checks for every C function and every struct
    used in wrapclock.cc.  It adds return values to GetTimespec and
    SetTimespec to allow the module to return a code representing
    unavailable.
    
    gcc/m2/ChangeLog:
    
    	PR modula2/110779
    	* gm2-libs-iso/SysClock.mod (GetClock): Test GetTimespec
    	return value.
    	(SetClock): Test SetTimespec return value.
    	* gm2-libs-iso/wrapclock.def (GetTimespec): Add integer
    	return type.
    	(SetTimespec): Add integer return type.
    
    libgm2/ChangeLog:
    
    	PR modula2/110779
    	* config.h.in: Regenerate.
    	* configure: Regenerate.
    	* configure.ac (AC_CACHE_CHECK): Check for tm_gmtoff field in
    	struct tm.
    	(GM2_CHECK_LIB): Check for daylight, timezone and tzname.
    	* libm2iso/wrapclock.cc (timezone): Guard against absence of
    	struct tm and tm_gmtoff.
    	(daylight): Check for daylight.
    	(timezone): Check for timezone.
    	(isdst): Check for isdst.
    	(tzname): Check for tzname.
    	(GetTimeRealtime): Check for struct timespec.
    	(SetTimeRealtime): Check for struct timespec.
    	(InitTimespec): Check for struct timespec.
    	(KillTimespec): Check for struct timespec.
    	(SetTimespec): Check for struct timespec.
    	(GetTimespec): Check for struct timespec.
    
    Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>