ObjFW  Check-in [963d5e2ffb]

Overview
Comment:Use trunc() if we don't have truncf()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 963d5e2ffb8ef0755ffb2bc71d44a8c57bc9e4d744f22b95ff3e888aed6d0eb5
User & Date: js on 2021-01-01 14:23:57
Other Links: manifest | tags
Context
2021-01-01
16:00
Update buildsys check-in: b7b1f6ce12 user: js tags: trunk
14:23
Use trunc() if we don't have truncf() check-in: 963d5e2ffb user: js tags: trunk
14:18
Update buildsys check-in: 5595245c5a user: js tags: trunk
Changes

Modified configure.ac from [e6d54a4062] to [78ab9b805e].

814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
	])
	;;
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"
		;;







|







814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
	])
	;;
esac

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

AC_CHECK_FUNCS(strtof truncf)

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

Modified utils/ofhttp/ProgressBar.m from [8b9c4a1fb2] to [b2e9be3b4a].

27
28
29
30
31
32
33




34
35
36
37
38
39
40
#import "ProgressBar.h"

#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)
#define KIBIBYTE (1024)

#define UPDATE_INTERVAL 0.1





@implementation ProgressBar
- (instancetype)initWithLength: (unsigned long long)length
		   resumedFrom: (unsigned long long)resumedFrom
		    useUnicode: (bool)useUnicode
{
	self = [super init];







>
>
>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#import "ProgressBar.h"

#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)
#define KIBIBYTE (1024)

#define UPDATE_INTERVAL 0.1

#ifndef HAVE_TRUNCF
# define truncf(x) trunc(x)
#endif

@implementation ProgressBar
- (instancetype)initWithLength: (unsigned long long)length
		   resumedFrom: (unsigned long long)resumedFrom
		    useUnicode: (bool)useUnicode
{
	self = [super init];