ObjFW  Check-in [0b07c8fcfa]

Overview
Comment:Make ObjFW compile for AmigaOS 3
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0b07c8fcfaffe8b0edcb38e23d8d1c34d23486fdcb95dcf9b8febf84681afcc0
User & Date: js on 2018-04-22 17:48:40
Other Links: manifest | tags
Context
2018-04-22
18:12
ObjFW_RT.h: Do not depend on platform.h check-in: 972fd1d98d user: js tags: trunk
17:48
Make ObjFW compile for AmigaOS 3 check-in: 0b07c8fcfa user: js tags: trunk
16:13
runtime: Define BOOL to be the same as bool check-in: fe2cbe0021 user: js tags: trunk
Changes

Modified configure.ac from [11d1ec3370] to [51a84fd78e].

20
21
22
23
24
25
26




















































27
28
29
30
31
32
33
AC_ARG_WITH(ixemul,
	AS_HELP_STRING([--with-ixemul], [build with ixemul]))

dnl Used to disable checking for -pedantic on some platforms where it's broken
check_pedantic="yes"

case "$host" in




















































	powerpc-*-amigaos*)
		enable_shared="no"
		enable_threads="no"
		;;
	*-morphos*)
		AS_IF([test x"$with_ixemul" != x"yes"], [
			OBJCFLAGS="$OBJCFLAGS -noixemul"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
AC_ARG_WITH(ixemul,
	AS_HELP_STRING([--with-ixemul], [build with ixemul]))

dnl Used to disable checking for -pedantic on some platforms where it's broken
check_pedantic="yes"

case "$host" in
	m68k-*-amigaos*)
		OBJCFLAGS="$OBJCFLAGS -noixemul"
		LDFLAGS="$LDFLAGS -noixemul"

		enable_shared="no"
		enable_threads="no"
		enable_sockets="no"
		enable_files="yes"	# Required for reading ENV:
		ac_cv_snprintf_useful_ret="yes"

		AC_DEFINE(ULLONG_MAX, 0xFFFFFFFFFFFFFFFFULL,
			[Maximum value for unsigned long long])
		AC_DEFINE(LLONG_MAX, 0x7FFFFFFFFFFFFFFFLL,
			[Maximum value for long long])
		AC_DEFINE(LLONG_MIN, [(-0x7FFFFFFFFFFFFFFFLL - 1)],
			[Minimum value for long long])

		AC_DEFINE(PRId8, "hhd", [Format string for 8-bit as decimal])
		AC_DEFINE(PRId16, "hd", [Format string for 16-bit as decimal])
		AC_DEFINE(PRId32, "d", [Format string for 32-bit as decimal])
		AC_DEFINE(PRId64, "lld", [Format string for 64-bit as decimal])
		AC_DEFINE(PRIi8, "hhi", [Format string for 8-bit as integer])
		AC_DEFINE(PRIi16, "hi", [Format string for 16-bit as integer])
		AC_DEFINE(PRIi32, "i", [Format string for 32-bit as integer])
		AC_DEFINE(PRIi64, "lli", [Format string for 64-bit as integer])
		AC_DEFINE(PRIo8, "hho", [Format string for 8-bit as octal])
		AC_DEFINE(PRIo16, "ho", [Format string for 16-bit as octal])
		AC_DEFINE(PRIo32, "o", [Format string for 32-bit as octal])
		AC_DEFINE(PRIo64, "llo", [Format string for 64-bit as octal])
		AC_DEFINE(PRIu8, "hhu", [Format string for 8-bit as unsigned])
		AC_DEFINE(PRIu16, "hu", [Format string for 16-bit as unsigned])
		AC_DEFINE(PRIu32, "u", [Format string for 32-bit as unsigned])
		AC_DEFINE(PRIu64, "llu", [Format string for 64-bit as unsigned])
		AC_DEFINE(PRIx8, "hhx",
			[Format string for 8-bit as lowercase hex])
		AC_DEFINE(PRIx16, "hx",
			[Format string for 16-bit as lowercase hex])
		AC_DEFINE(PRIx32, "x",
			[Format string for 32-bit as lowercase hex])
		AC_DEFINE(PRIx64, "llx",
			[Format string for 64-bit as lowercase hex])
		AC_DEFINE(PRIX8, "hhX",
			[Format string for 8-bit as uppercase hex])
		AC_DEFINE(PRIX16, "hX",
			[Format string for 16-bit as uppercase hex])
		AC_DEFINE(PRIX32, "X",
			[Format string for 32-bit as uppercase hex])
		AC_DEFINE(PRIX64, "llX",
			[Format string for 64-bit as uppercase hex])

		AC_SUBST(NOIXEMUL, -noixemul)
		;;
	powerpc-*-amigaos*)
		enable_shared="no"
		enable_threads="no"
		;;
	*-morphos*)
		AS_IF([test x"$with_ixemul" != x"yes"], [
			OBJCFLAGS="$OBJCFLAGS -noixemul"
207
208
209
210
211
212
213








214
215
216
217
218
219
220
	[OBJCFLAGS="$OBJCFLAGS -Wundeclared-selector"])
AX_CHECK_COMPILER_FLAGS([-Wsemicolon-before-method-body -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"])
AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"])
AX_CHECK_COMPILER_FLAGS([-Wmissing-method-return-type -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wmissing-method-return-type"])









AC_MSG_CHECKING(whether Objective C compiler supports properties)
AC_TRY_COMPILE([
	#ifdef __has_attribute
	# if __has_attribute(objc_root_class)
	__attribute__((__objc_root_class__))
	# endif







>
>
>
>
>
>
>
>







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
	[OBJCFLAGS="$OBJCFLAGS -Wundeclared-selector"])
AX_CHECK_COMPILER_FLAGS([-Wsemicolon-before-method-body -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"])
AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"])
AX_CHECK_COMPILER_FLAGS([-Wmissing-method-return-type -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wmissing-method-return-type"])

case "$host" in
	m68k-*-amigaos*)
		dnl The inline headers generate code that triggers
		dnl -Wpointer-sign.
		OBJCFLAGS="$OBJCFLAGS -Wno-pointer-sign"
		;;
esac

AC_MSG_CHECKING(whether Objective C compiler supports properties)
AC_TRY_COMPILE([
	#ifdef __has_attribute
	# if __has_attribute(objc_root_class)
	__attribute__((__objc_root_class__))
	# endif
594
595
596
597
598
599
600



601
602
603
604
605
606
607
608
609
], [
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
	AC_DEFINE(UINTPTR_MAX, [(~(uintptr_t)0)], [Maximum value for uintptr_t])
])




AC_CHECK_HEADER(sys/types.h,
	[AC_DEFINE(OF_HAVE_SYS_TYPES_H, 1, [Whether we have <sys/types.h>])])

AC_CHECK_TYPE(max_align_t,
	[AC_DEFINE(OF_HAVE_MAX_ALIGN_T, 1, [Whether we have max_align_t])])

AC_CHECK_HEADER(stdnoreturn.h,
	[AC_DEFINE(OF_HAVE_STDNORETURN_H, 1, [Whether we have stdnoreturn.h])])








>
>
>

|







654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
], [
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
	AC_DEFINE(UINTPTR_MAX, [(~(uintptr_t)0)], [Maximum value for uintptr_t])
])

AC_CHECK_HEADER(inttypes.h,
	[AC_DEFINE(OF_HAVE_INTTYPES_H, 1, [Whether we have inttypes.h])])

AC_CHECK_HEADER(sys/types.h,
	[AC_DEFINE(OF_HAVE_SYS_TYPES_H, 1, [Whether we have sys/types.h])])

AC_CHECK_TYPE(max_align_t,
	[AC_DEFINE(OF_HAVE_MAX_ALIGN_T, 1, [Whether we have max_align_t])])

AC_CHECK_HEADER(stdnoreturn.h,
	[AC_DEFINE(OF_HAVE_STDNORETURN_H, 1, [Whether we have stdnoreturn.h])])

1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
])

AC_DEFUN([CHECK_BUILTIN_BSWAP], [
	AC_MSG_CHECKING(for __builtin_bswap$1)
	AC_TRY_LINK([
		#include <stdint.h>
		#include <stdio.h>
		#include <inttypes.h>
		#include <errno.h>
	], [
		uint$1_t i = errno;
		printf("%" PRIu$1, __builtin_bswap$1(i));
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(OF_HAVE_BUILTIN_BSWAP$1, 1,
			[Whether we have __builtin_bswap$1])
	], [
		AC_MSG_RESULT(no)
	])







<



|







1363
1364
1365
1366
1367
1368
1369

1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
])

AC_DEFUN([CHECK_BUILTIN_BSWAP], [
	AC_MSG_CHECKING(for __builtin_bswap$1)
	AC_TRY_LINK([
		#include <stdint.h>
		#include <stdio.h>

		#include <errno.h>
	], [
		uint$1_t i = errno;
		printf("%d", (int)__builtin_bswap$1(i));
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(OF_HAVE_BUILTIN_BSWAP$1, 1,
			[Whether we have __builtin_bswap$1])
	], [
		AC_MSG_RESULT(no)
	])

Modified src/OFApplication.m from [8777ac3750] to [af29800e76].

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55



56
57
58
59
60
61
62
#import "OFDictionary.h"
#import "OFLocalization.h"
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"
#import "OFThread.h"
#import "OFThread+Private.h"
#import "OFSandbox.h"
#ifdef OF_MORPHOS
# import "OFFile.h"
# import "OFFileManager.h"
#endif

#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFSandboxActivationFailedException.h"

#if defined(OF_MACOS)
# include <crt_externs.h>
#elif defined(OF_WINDOWS)
# include <windows.h>

extern int _CRT_glob;
extern void __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *);
#elif defined(OF_MORPHOS)



# include <proto/exec.h>
# include <proto/dos.h>
#elif !defined(OF_IOS)
extern char **environ;
#endif

#ifdef OF_PSP







|















|
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#import "OFDictionary.h"
#import "OFLocalization.h"
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"
#import "OFThread.h"
#import "OFThread+Private.h"
#import "OFSandbox.h"
#ifdef OF_AMIGAOS
# import "OFFile.h"
# import "OFFileManager.h"
#endif

#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFSandboxActivationFailedException.h"

#if defined(OF_MACOS)
# include <crt_externs.h>
#elif defined(OF_WINDOWS)
# include <windows.h>

extern int _CRT_glob;
extern void __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *);
#elif defined(OF_AMIGAOS)
# ifdef OF_AMIGAOS3
#  define INTUITION_CLASSES_H
# endif
# include <proto/exec.h>
# include <proto/dos.h>
#elif !defined(OF_IOS)
extern char **environ;
#endif

#ifdef OF_PSP
175
176
177
178
179
180
181


182
183
184
185
186
187
188
	OF_UNREACHABLE
}

+ (void)terminateWithStatus: (int)status
{
#ifndef OF_PSP
	exit(status);


#else
	sceKernelExitGame();

	OF_UNREACHABLE
#endif
}








>
>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
	OF_UNREACHABLE
}

+ (void)terminateWithStatus: (int)status
{
#ifndef OF_PSP
	exit(status);

	OF_UNREACHABLE
#else
	sceKernelExitGame();

	OF_UNREACHABLE
#endif
}

245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
			[_environment setObject: value
					 forKey: key];

			objc_autoreleasePoolPop(pool);
		}

		FreeEnvironmentStringsW(env0);
#elif defined(OF_MORPHOS)
		void *pool = objc_autoreleasePoolPush();
		OFFileManager *fileManager = [OFFileManager defaultManager];
		OFArray *envContents =
		    [fileManager contentsOfDirectoryAtPath: @"ENV:"];
		const of_string_encoding_t encoding = [OFLocalization encoding];
		struct Process *proc;
		struct LocalVar *firstLocalVar;







|







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
			[_environment setObject: value
					 forKey: key];

			objc_autoreleasePoolPop(pool);
		}

		FreeEnvironmentStringsW(env0);
#elif defined(OF_AMIGAOS)
		void *pool = objc_autoreleasePoolPush();
		OFFileManager *fileManager = [OFFileManager defaultManager];
		OFArray *envContents =
		    [fileManager contentsOfDirectoryAtPath: @"ENV:"];
		const of_string_encoding_t encoding = [OFLocalization encoding];
		struct Process *proc;
		struct LocalVar *firstLocalVar;

Modified src/OFDate.m from [47df94d5a9] to [dd9564fb7b].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>
#include <limits.h>
#include <time.h>
#include <math.h>

#include <sys/time.h>

#import "OFDate.h"







<







13
14
15
16
17
18
19

20
21
22
23
24
25
26
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"


#include <limits.h>
#include <time.h>
#include <math.h>

#include <sys/time.h>

#import "OFDate.h"

Modified src/OFLocalization.m from [ae5afaaea8] to [72ae978ca9].

31
32
33
34
35
36
37



38
39
40
41
42
43
44

#ifdef OF_AMIGAOS
# ifdef OF_AMIGAOS4
#  define __NOLIBBASE__
#  define __NOGLOBALIFACE__
#  define __USE_INLINE__
# endif



# include <proto/dos.h>
# include <proto/exec.h>
# include <proto/locale.h>
#endif

static OFLocalization *sharedLocalization = nil;








>
>
>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

#ifdef OF_AMIGAOS
# ifdef OF_AMIGAOS4
#  define __NOLIBBASE__
#  define __NOGLOBALIFACE__
#  define __USE_INLINE__
# endif
# ifdef OF_AMIGAOS3
#  define INTUITION_CLASSES_H
# endif
# include <proto/dos.h>
# include <proto/exec.h>
# include <proto/locale.h>
#endif

static OFLocalization *sharedLocalization = nil;

Modified src/OFNumber.m from [25c5c7f684] to [22aa4870ba].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>
#include <math.h>

#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFXMLAttribute.h"
#import "OFData.h"







<







13
14
15
16
17
18
19

20
21
22
23
24
25
26
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"


#include <math.h>

#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFXMLAttribute.h"
#import "OFData.h"

Modified src/OFObject.m from [678b6e28e1] to [de528ece86].

151
152
153
154
155
156
157


158
159
160
161
162
163
164
	[obj doesNotRecognizeSelector: sel];

	/*
	 * Just in case doesNotRecognizeSelector: returned, even though it must
	 * never return.
	 */
	abort();


}

void OF_NO_RETURN_FUNC
of_method_not_found_stret(void *st, id obj, SEL sel)
{
	of_method_not_found(obj, sel);
}







>
>







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
	[obj doesNotRecognizeSelector: sel];

	/*
	 * Just in case doesNotRecognizeSelector: returned, even though it must
	 * never return.
	 */
	abort();

	OF_UNREACHABLE
}

void OF_NO_RETURN_FUNC
of_method_not_found_stret(void *st, id obj, SEL sel)
{
	of_method_not_found(obj, sel);
}

Modified src/OFString.h from [0a00717fb4] to [ee47c97ffb].

26
27
28
29
30
31
32



33
34
35
36
37
38
39

#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif

#include <stdarg.h>
#include <stdint.h>




#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"
#import "OFMessagePackRepresentation.h"

OF_ASSUME_NONNULL_BEGIN







>
>
>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

#ifdef OF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif

#include <stdarg.h>
#include <stdint.h>
#ifdef OF_HAVE_INTTYPES_H
# include <inttypes.h>
#endif

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"
#import "OFMessagePackRepresentation.h"

OF_ASSUME_NONNULL_BEGIN

Modified src/OFString.m from [c0c777343c] to [1882c89ea1].

64
65
66
67
68
69
70





71
72
73
74
75
76
77
/*
 * It seems strtod is buggy on Win32.
 * However, the MinGW version __strtod seems to be ok.
 */
#ifdef __MINGW32__
# define strtod __strtod
#endif






static struct {
	Class isa;
} placeholder;

#if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L)
static locale_t cLocale;







>
>
>
>
>







64
65
66
67
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_AMIGAOS3
/* libnix has strtod, but not strtof */
# define strtof strtod
#endif

static struct {
	Class isa;
} placeholder;

#if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L)
static locale_t cLocale;

Modified src/OFTarArchiveEntry.m from [70ac5e54d1] to [426c84e614].

13
14
15
16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFTarArchiveEntry.h"
#import "OFTarArchiveEntry+Private.h"

#import "OFStream.h"
#import "OFDate.h"

#import "OFOutOfRangeException.h"

static OFString *
stringFromBuffer(const unsigned char *buffer, size_t length)
{
	for (size_t i = 0; i < length; i++)







<
<


>

|







13
14
15
16
17
18
19


20
21
22
23
24
25
26
27
28
29
30
31
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



#import "OFTarArchiveEntry.h"
#import "OFTarArchiveEntry+Private.h"
#import "OFDate.h"
#import "OFStream.h"
#import "OFString.h"

#import "OFOutOfRangeException.h"

static OFString *
stringFromBuffer(const unsigned char *buffer, size_t length)
{
	for (size_t i = 0; i < length; i++)

Modified src/OFThread.m from [87b40649c1] to [6fbe74a9ed].

80
81
82
83
84
85
86



87
88
89
90
91
92
93
#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif

#ifdef OF_DJGPP
# define lrint(x) rint(x)
#endif




#ifdef OF_HAVE_THREADS
# import "threading.h"

static of_tlskey_t threadSelfKey;
static OFThread *mainThread;








>
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif

#ifdef OF_DJGPP
# define lrint(x) rint(x)
#endif
#ifdef OF_AMIGAOS3
# define lrint(x) ((long)x)
#endif

#ifdef OF_HAVE_THREADS
# import "threading.h"

static of_tlskey_t threadSelfKey;
static OFThread *mainThread;

Modified src/OFZIPArchiveEntry.m from [d69e7fdce5] to [59110171a1].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFZIPArchiveEntry.h"
#import "OFZIPArchiveEntry+Private.h"
#import "OFString.h"
#import "OFData.h"
#import "OFDate.h"
#import "OFStream.h"


#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"

extern uint32_t of_zip_archive_read_field32(const uint8_t **, uint16_t *);
extern uint64_t of_zip_archive_read_field64(const uint8_t **, uint16_t *);







<
<


<



>







13
14
15
16
17
18
19


20
21

22
23
24
25
26
27
28
29
30
31
32
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



#import "OFZIPArchiveEntry.h"
#import "OFZIPArchiveEntry+Private.h"

#import "OFData.h"
#import "OFDate.h"
#import "OFStream.h"
#import "OFString.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"

extern uint32_t of_zip_archive_read_field32(const uint8_t **, uint16_t *);
extern uint64_t of_zip_archive_read_field64(const uint8_t **, uint16_t *);

Modified src/exceptions/OFBindFailedException.m from [d4bdfa895b] to [6201d3f9da].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFBindFailedException.h"
#import "OFString.h"

@implementation OFBindFailedException
@synthesize host = _host, port = _port, socket = _socket, errNo = _errNo;

+ (instancetype)exception







<
<







13
14
15
16
17
18
19


20
21
22
23
24
25
26
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



#import "OFBindFailedException.h"
#import "OFString.h"

@implementation OFBindFailedException
@synthesize host = _host, port = _port, socket = _socket, errNo = _errNo;

+ (instancetype)exception

Modified src/exceptions/OFConnectionFailedException.m from [8aa06d8a8e] to [67236a818b].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFConnectionFailedException.h"
#import "OFString.h"

@implementation OFConnectionFailedException
@synthesize host = _host, port = _port, socket = _socket, errNo = _errNo;

+ (instancetype)exception







<
<







13
14
15
16
17
18
19


20
21
22
23
24
25
26
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



#import "OFConnectionFailedException.h"
#import "OFString.h"

@implementation OFConnectionFailedException
@synthesize host = _host, port = _port, socket = _socket, errNo = _errNo;

+ (instancetype)exception

Modified src/objfw-defs.h.in from [a14966c560] to [63d5610c05].

1


2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
#undef INFINITY


#undef OF_APPLE_RUNTIME
#undef OF_BIG_ENDIAN
#undef OF_FLOAT_BIG_ENDIAN
#undef OF_HAVE_ATOMIC_BUILTINS
#undef OF_HAVE_ATOMIC_OPS
#undef OF_HAVE_BUILTIN_BSWAP16
#undef OF_HAVE_BUILTIN_BSWAP32
#undef OF_HAVE_BUILTIN_BSWAP64
#undef OF_HAVE_CHMOD
#undef OF_HAVE_CHOWN
#undef OF_HAVE_FILES
#undef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#undef OF_HAVE_IPV6

#undef OF_HAVE_LINK
#undef OF_HAVE_MAX_ALIGN_T
#undef OF_HAVE_NETINET_IN_H
#undef OF_HAVE_OSATOMIC
#undef OF_HAVE_OSATOMIC_64
#undef OF_HAVE_PIPE
#undef OF_HAVE_PLEDGE

>
>













>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#undef INFINITY
#undef LLONG_MAX
#undef LLONG_MIN
#undef OF_APPLE_RUNTIME
#undef OF_BIG_ENDIAN
#undef OF_FLOAT_BIG_ENDIAN
#undef OF_HAVE_ATOMIC_BUILTINS
#undef OF_HAVE_ATOMIC_OPS
#undef OF_HAVE_BUILTIN_BSWAP16
#undef OF_HAVE_BUILTIN_BSWAP32
#undef OF_HAVE_BUILTIN_BSWAP64
#undef OF_HAVE_CHMOD
#undef OF_HAVE_CHOWN
#undef OF_HAVE_FILES
#undef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#undef OF_HAVE_IPV6
#undef OF_HAVE_LIMITS_H
#undef OF_HAVE_LINK
#undef OF_HAVE_MAX_ALIGN_T
#undef OF_HAVE_NETINET_IN_H
#undef OF_HAVE_OSATOMIC
#undef OF_HAVE_OSATOMIC_64
#undef OF_HAVE_PIPE
#undef OF_HAVE_PLEDGE
34
35
36
37
38
39
40
























41
42

#undef OF_HAVE_THREADS
#undef OF_HAVE_UNICODE_TABLES
#undef OF_HAVE__THREAD_LOCAL
#undef OF_HAVE___THREAD
#undef OF_NINTENDO_DS
#undef OF_OBJFW_RUNTIME
#undef OF_UNIVERSAL
























#undef SIZE_MAX
#undef UINTPTR_MAX








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


>
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#undef OF_HAVE_THREADS
#undef OF_HAVE_UNICODE_TABLES
#undef OF_HAVE__THREAD_LOCAL
#undef OF_HAVE___THREAD
#undef OF_NINTENDO_DS
#undef OF_OBJFW_RUNTIME
#undef OF_UNIVERSAL
#undef PRId8
#undef PRId16
#undef PRId32
#undef PRId64
#undef PRIi8
#undef PRIi16
#undef PRIi32
#undef PRIi64
#undef PRIo8
#undef PRIo16
#undef PRIo32
#undef PRIo64
#undef PRIu8
#undef PRIu16
#undef PRIu32
#undef PRIu64
#undef PRIx8
#undef PRIx16
#undef PRIx32
#undef PRIx64
#undef PRIX8
#undef PRIX16
#undef PRIX32
#undef PRIX64
#undef SIZE_MAX
#undef UINTPTR_MAX
#undef ULLONG_MAX

Modified src/platform.h from [e2985d06d3] to [996f4da56a].

104
105
106
107
108
109
110



111
112
113
114
115
116
117
#  define OF_MORPHOS
#  define OF_AMIGAOS
# else
#  define OF_MORPHOS_IXEMUL
# endif
#elif defined(__amigaos4__)
# define OF_AMIGAOS4



# define OF_AMIGAOS
#elif defined(__sun__)
# define OF_SOLARIS
#elif defined(__QNX__)
# define OF_QNX
#elif defined(__wii__)
# define OF_WII







>
>
>







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#  define OF_MORPHOS
#  define OF_AMIGAOS
# else
#  define OF_MORPHOS_IXEMUL
# endif
#elif defined(__amigaos4__)
# define OF_AMIGAOS4
# define OF_AMIGAOS
#elif defined(__amigaos__)
# define OF_AMIGAOS3
# define OF_AMIGAOS
#elif defined(__sun__)
# define OF_SOLARIS
#elif defined(__QNX__)
# define OF_QNX
#elif defined(__wii__)
# define OF_WII

Modified src/resolver.m from [fa7a0544ce] to [444cb9ff29].

18
19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
#include "config.h"

#define _WIN32_WINNT 0x0501

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

#import "resolver.h"


#import "macros.h"

#if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS)
# include "threading.h"
#endif

#import "OFAddressTranslationFailedException.h"







<

|

>







18
19
20
21
22
23
24

25
26
27
28
29
30
31
32
33
34
35
#include "config.h"

#define _WIN32_WINNT 0x0501

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#import "OFString.h"

#import "resolver.h"
#import "macros.h"

#if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS)
# include "threading.h"
#endif

#import "OFAddressTranslationFailedException.h"

Modified src/runtime/ObjFW_RT.h from [75ca2f1db8] to [3317550b05].

24
25
26
27
28
29
30


31
32
33
34
35
36
37
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>



#ifndef __has_feature
# define __has_feature(x) 0
#endif

#ifndef __has_attribute
# define __has_attribute(x) 0







>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#import "platform.h"

#ifndef __has_feature
# define __has_feature(x) 0
#endif

#ifndef __has_attribute
# define __has_attribute(x) 0

Modified src/runtime/private.h from [fd3f5c5f59] to [32f9dbeb3a].

13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"


#include "platform.h"

#if !defined(__has_feature) || !__has_feature(nullability)
# ifndef _Nonnull
#  define _Nonnull
# endif
# ifndef _Nullable
#  define _Nullable







>
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "macros.h"
#import "platform.h"

#if !defined(__has_feature) || !__has_feature(nullability)
# ifndef _Nonnull
#  define _Nonnull
# endif
# ifndef _Nullable
#  define _Nullable
220
221
222
223
224
225
226

227

#define OBJC_ERROR(...)							\
	{								\
		fprintf(stderr, "[objc @ " __FILE__ ":%d] ", __LINE__);	\
		fprintf(stderr, __VA_ARGS__);				\
		fputs("\n", stderr);					\
		abort();						\

	}







>

221
222
223
224
225
226
227
228
229

#define OBJC_ERROR(...)							\
	{								\
		fprintf(stderr, "[objc @ " __FILE__ ":%d] ", __LINE__);	\
		fprintf(stderr, __VA_ARGS__);				\
		fputs("\n", stderr);					\
		abort();						\
		OF_UNREACHABLE						\
	}

Modified tests/ForwardingTests.m from [b356b79162] to [3228857020].

119
120
121
122
123
124
125


126
127
128
129
130
131
132
		return nil;

	if (sel_isEqual(selector, @selector(forwardingTargetSelfTest)) ||
	    sel_isEqual(selector, @selector(forwardingTargetSelfStRetTest)))
		return self;

	abort();


}
@end

@implementation ForwardingTarget
- (uint32_t)forwardingTargetTest: (intptr_t)a0
				: (intptr_t)a1
				: (double)a2







>
>







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
		return nil;

	if (sel_isEqual(selector, @selector(forwardingTargetSelfTest)) ||
	    sel_isEqual(selector, @selector(forwardingTargetSelfStRetTest)))
		return self;

	abort();

	OF_UNREACHABLE
}
@end

@implementation ForwardingTarget
- (uint32_t)forwardingTargetTest: (intptr_t)a0
				: (intptr_t)a1
				: (double)a2

Modified utils/ofzip/TarArchive.m from [4c9cd970e5] to [3aacd208ea].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"


#import "TarArchive.h"
#import "OFZIP.h"

static OFZIP *app;

static void







<
<







>







13
14
15
16
17
18
19


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"
#import "OFString.h"

#import "TarArchive.h"
#import "OFZIP.h"

static OFZIP *app;

static void

Modified utils/ofzip/ZIPArchive.m from [f8793bebd7] to [fe7d9002b6].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <inttypes.h>
#include <errno.h>

#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"


#import "ZIPArchive.h"
#import "OFZIP.h"

#import "OFInvalidFormatException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"







<









>







13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"


#include <errno.h>

#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"
#import "OFString.h"

#import "ZIPArchive.h"
#import "OFZIP.h"

#import "OFInvalidFormatException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"