-
- Downloads
PR modula2/110779 SysClock can not read the clock (Darwin 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 <gaiusmod2@gmail.com>
Showing
- gcc/m2/gm2-libs-iso/SysClock.mod 26 additions, 8 deletionsgcc/m2/gm2-libs-iso/SysClock.mod
- gcc/m2/gm2-libs-iso/wrapclock.def 12 additions, 0 deletionsgcc/m2/gm2-libs-iso/wrapclock.def
- libgm2/configure 38 additions, 2 deletionslibgm2/configure
- libgm2/configure.ac 36 additions, 0 deletionslibgm2/configure.ac
- libgm2/libm2iso/wrapclock.cc 115 additions, 86 deletionslibgm2/libm2iso/wrapclock.cc
Loading
Please register or sign in to comment