https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110779
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:63fb0bedb8077ac1e6b6337f198b4eae30813fbc commit r14-3180-g63fb0bedb8077ac1e6b6337f198b4eae30813fbc Author: Gaius Mulley <gaiusm...@gmail.com> Date: Sat Aug 12 18:17:41 2023 +0100 PR modula2/110779 SysClock can not read the clock (Darwin portability fixes) This patch adds corrections to defensively check against glibc functions, structures and contains fallbacks. These fixes were required under Darwin. gcc/m2/ChangeLog: PR modula2/110779 * gm2-libs-iso/SysClock.mod (EpochTime): New procedure. (GetClock): Call EpochTime if the C time functions are unavailable. * gm2-libs-iso/wrapclock.def (istimezone): New function definition. libgm2/ChangeLog: PR modula2/110779 * configure: Regenerate. * configure.ac: Provide special case test for Darwin cross configuration. (GLIBCXX_CONFIGURE): New statement. (GLIBCXX_CHECK_GETTIMEOFDAY): New statement. (GLIBCXX_ENABLE_LIBSTDCXX_TIME): New statement. * libm2iso/wrapclock.cc: New sys/time.h conditional include. (sys/syscall.h): Conditional include. (unistd.h): Conditional include. (GetTimeRealtime): Re-implement. (SetTimeRealtime): Re-implement. (timezone): Re-implement. (istimezone): New function. (daylight): Re-implement. (isdst): Re-implement. (tzname): Re-implement. Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>