At present, clock-related tests fail everywhere on Darwin. There
are a few reasons and they mostly will affect other non-glibc targets too.
1. malloc.h is not portable, switch to using stdlib.h
2. sync the configure changes for clock functions recently applied to
libstdc++ (which was used as a basis for this).
3. provide a fallback to gettimofday when clock_gettime is not available
(also shamelessly copied from libstdc++)
4. Cosmetic; rename the various configure variables to match the library
instead of the copied libstdc++ ones.
Tested on x86_64-linux, x86_64 (with clock_gettime) and i686 (without)
darwin, OK for trunk?
thanks
Iain
Iain Sandoe (4):
libgm2: Avoid malloc.h as it is not portable.
libgm2, configure: Update clock_gettime config to match libstdc++.
libgm2: Provide fallback GetTimeRealtime when clock_getttime is not
available.
libgm2, configure: Rename variables to match the library.
libgm2/Makefile.in | 6 +-
libgm2/acinclude.m4 | 145 ++++++++++++++++++-----------------
libgm2/config.h.in | 16 ++--
libgm2/configure | 91 +++++++++++-----------
libgm2/configure.ac | 12 +--
libgm2/configure.host | 16 ++--
libgm2/libm2cor/Makefile.in | 6 +-
libgm2/libm2iso/Makefile.in | 6 +-
libgm2/libm2iso/wrapclock.cc | 35 ++++++---
libgm2/libm2iso/wrapsock.c | 2 +-
libgm2/libm2iso/wraptime.cc | 14 ++--
libgm2/libm2log/Makefile.in | 6 +-
libgm2/libm2min/Makefile.in | 6 +-
libgm2/libm2pim/Makefile.in | 6 +-
14 files changed, 194 insertions(+), 173 deletions(-)
--
2.50.1 (Apple Git-155)