ObjFW  Check-in [aceaca225d]

Overview
Comment:Use strtod() if we have no strtof()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: aceaca225da96c0c6a2c83db0cc8a128cee125c55b7144bdef36ee3a5c767e43
User & Date: js on 2020-12-31 17:28:47
Other Links: manifest | tags
Context
2020-12-31
17:31
Add -latomic on HP-UX check-in: cc681ad9ec user: js tags: trunk
17:28
Use strtod() if we have no strtof() check-in: aceaca225d user: js tags: trunk
17:17
Work around broken <inttypes.h> on HP-UX check-in: 6a38440dd3 user: js tags: trunk
Changes

Modified configure.ac from [fc163592ff] to [75b318c318].

811
812
813
814
815
816
817


818
819
820
821
822
823
824
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826







+
+







		AC_MSG_RESULT(no)
	])
	;;
esac

AC_CHECK_LIB(m, fmod, LIBS="$LIBS -lm")
AC_CHECK_LIB(complex, creal, TESTS_LIBS="$TESTS_LIBS -lcomplex")

AC_CHECK_FUNCS(strtof)

AC_CHECK_FUNC(asprintf, [
	case "$host" in
	*-*-mingw*)
		dnl asprintf from MinGW is broken on older Windows versions
		have_asprintf="no"
		;;

Modified src/OFString.m from [c76470c0f1] to [7e6178bd46].

68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
68
69
70
71
72
73
74

75

76
77
78
79
80
81
82







-
+
-







 * It seems strtod is buggy on Win32.
 * However, the MinGW version __strtod seems to be ok.
 */
#ifdef __MINGW32__
# define strtod __strtod
#endif

#ifdef OF_AMIGAOS_M68K
#ifndef HAVE_STRTOF
/* libnix has strtod, but not strtof */
# define strtof strtod
#endif

#ifndef INFINITY
# define INFINITY __builtin_inf()
#endif