ObjFW  Check-in [04d97d6ce2]

Overview
Comment:Enable sockets on MiNT
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 04d97d6ce219c59053bd9601652f9ee42fc06d253f453391f928af4c2622a9c6
User & Date: js on 2022-01-29 21:47:20
Other Links: manifest | tags
Context
2022-01-29
22:00
Revert back to native MiNT paths check-in: 74a6376d81 user: js tags: trunk
21:47
Enable sockets on MiNT check-in: 04d97d6ce2 user: js tags: trunk
21:10
PLATFORMS.md: Add MiNT check-in: 9b3ffad406 user: js tags: trunk
Changes

Modified PLATFORMS.md from [0c79570a50] to [74dca258ba].

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
MiNT
----

  * OS Versions: FreeMiNT 1.19
  * Architectures: m68k
  * Runtimes: ObjFW
  * Compilers: GCC 4.6.4 (MiNT 20130415)
  * Limitations: No threads, no sockets


MorphOS
-------

  * OS Versions: 3.14
  * Architectures: PowerPC







|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
MiNT
----

  * OS Versions: FreeMiNT 1.19
  * Architectures: m68k
  * Runtimes: ObjFW
  * Compilers: GCC 4.6.4 (MiNT 20130415)
  * Limitations: No shared libraries, no threads


MorphOS
-------

  * OS Versions: 3.14
  * Architectures: PowerPC

Modified configure.ac from [0f0c6381c8] to [3c19adf8e7].

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
	OBJCFLAGS="$OBJCFLAGS -include inttypes.h"
	dnl We need -latomic for GCC's atomics to work.
	LIBS="$LIBS -latomic"
	;;
*-*-mint*)
	enable_shared="no"
	enable_threads="no"	# TODO
	enable_sockets="no"	# TODO
	;;
esac

AS_IF([test x"$host_os" = x"msdosdjgpp" -a x"$build_os" = x"msdosdjgpp"], [
	dnl Hack to make configure find these on DOS.
	: ${AR:=ar.exe}
	: ${GREP:=grep.exe}







|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
	OBJCFLAGS="$OBJCFLAGS -include inttypes.h"
	dnl We need -latomic for GCC's atomics to work.
	LIBS="$LIBS -latomic"
	;;
*-*-mint*)
	enable_shared="no"
	enable_threads="no"	# TODO
	with_tls="no"
	;;
esac

AS_IF([test x"$host_os" = x"msdosdjgpp" -a x"$build_os" = x"msdosdjgpp"], [
	dnl Hack to make configure find these on DOS.
	: ${AR:=ar.exe}
	: ${GREP:=grep.exe}
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
])

AC_MSG_CHECKING(whether we need -D_GNU_SOURCE)
AC_EGREP_CPP(egrep_cpp_yes, [
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__)
	egrep_cpp_yes
	#endif
], [
	AC_MSG_RESULT(yes)
	CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	gnu_source="yes"
], [







|







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
])

AC_MSG_CHECKING(whether we need -D_GNU_SOURCE)
AC_EGREP_CPP(egrep_cpp_yes, [
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__) || defined(__MINT__)
	egrep_cpp_yes
	#endif
], [
	AC_MSG_RESULT(yes)
	CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	gnu_source="yes"
], [
1502
1503
1504
1505
1506
1507
1508




1509
1510
1511
1512
1513
1514
1515
		#ifdef HAVE_AFUNIX_H
		# include <afunix.h>
		#endif

		#ifdef __morphos__
		# error MorphOS has the struct but does not support it
		#endif




	])

	AC_CHECK_FUNCS(paccept accept4, break)

	AC_CHECK_FUNCS(kqueue1 kqueue, [
		AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue])
		AC_SUBST(OF_KQUEUE_KERNEL_EVENT_OBSERVER_M,







>
>
>
>







1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
		#ifdef HAVE_AFUNIX_H
		# include <afunix.h>
		#endif

		#ifdef __morphos__
		# error MorphOS has the struct but does not support it
		#endif

		#ifdef __MINT__
		# error Gives invalid argument at runtime
		#endif
	])

	AC_CHECK_FUNCS(paccept accept4, break)

	AC_CHECK_FUNCS(kqueue1 kqueue, [
		AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue])
		AC_SUBST(OF_KQUEUE_KERNEL_EVENT_OBSERVER_M,

Modified utils/ofhttp/ProgressBar.m from [55b889a4e0] to [495096e467].

25
26
27
28
29
30
31





32
33
34
35
36
37
38
#import "ProgressBar.h"

static const float oneKibibyte = 1024;
static const float oneMebibyte = 1024 * 1024;
static const float oneGibibyte = 1024 * 1024 * 1024;

static const OFTimeInterval updateInterval = 0.1;






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

@implementation ProgressBar
- (instancetype)initWithLength: (unsigned long long)length







>
>
>
>
>







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

static const float oneKibibyte = 1024;
static const float oneMebibyte = 1024 * 1024;
static const float oneGibibyte = 1024 * 1024 * 1024;

static const OFTimeInterval updateInterval = 0.1;

#ifdef OF_MINT
/* freemint-gcc does not have trunc() */
# define trunc(x) ((int64_t)(x))
#endif

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

@implementation ProgressBar
- (instancetype)initWithLength: (unsigned long long)length