PR modula2/112110: fails to build on freebsd when compiling wrapclock.cc

This patch fixes a mangled #if #endif conditional section within
wrapclock.cc.  The conditional section in wrapclock_timezone
should return 0 rather than return timezone.

libgm2/ChangeLog:

	PR modula2/112110
	* libm2iso/wrapclock.cc (timezone): Return 0 if unable
	to get the timezone from the tm struct.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
This commit is contained in:
Gaius Mulley 2023-10-27 18:42:09 +01:00
parent c6430d3e6d
commit 32cc0b82a3

View File

@ -235,16 +235,9 @@ EXPORT(timezone) (void)
localtime_r (&time, &result);
return result.tm_gmtoff;
}
else
#endif
#endif
{
#if defined(HAVE_TIMEZONE)
return timezone;
#else
return 0;
#endif
}
return 0;
}
/* istimezone returns 1 if timezone in wrapclock.cc can resolve the