ObjFW  Check-in [50a6ffd4b1]

Overview
Comment:Fix compilation on AmigaOS 4 with 53.30 SDK
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 50a6ffd4b105d33f7970e469eb3e270c93ca4c79c910232fc1f27a99c6023a78
User & Date: js on 2019-04-21 09:58:27
Other Links: manifest | tags
Context
2019-04-21
17:26
runtime: Fix missing _t suffix in types check-in: f0c9c3a9f7 user: js tags: trunk
09:58
Fix compilation on AmigaOS 4 with 53.30 SDK check-in: 50a6ffd4b1 user: js tags: trunk
2019-04-20
20:34
objfw-config: Rename package_{description->format} check-in: a02aeca5a9 user: js tags: trunk
Changes

Modified src/OFDNSResolver.m from [d3f87f2f5a] to [e622efd3e9].

103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117







-
+







extern struct ExecIFace *IExec;
static struct Library *SocketBase = NULL;
static struct SocketIFace *ISocket = NULL;

OF_DESTRUCTOR()
{
	if (ISocket != NULL)
		DropInterface(ISocket);
		DropInterface((struct Interface *)ISocket);

	if (SocketBase != NULL)
		CloseLibrary(SocketBase);
}
#endif

/*

Modified src/OFFile.m from [8a440b67d1] to [8652eb3c8f].

115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129







-
+







{
	for (of_file_handle_t iter = firstHandle; iter != NULL;
	    iter = iter->next)
		Close(iter->handle);

# ifdef OF_AMIGAOS4
	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
# endif
}
#endif

Modified src/OFFileManager.m from [05c7194aa4] to [3d2ebfc062].

108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141







+


















-
+







const of_file_type_t of_file_type_fifo = @"of_file_type_fifo";
const of_file_type_t of_file_type_character_special =
    @"of_file_type_character_special";
const of_file_type_t of_file_type_block_special = @"of_file_type_block_special";
const of_file_type_t of_file_type_socket = @"of_file_type_socket";

#ifdef OF_AMIGAOS4
# define CurrentDir(lock) SetCurrentDir(lock)
extern struct ExecIFace *IExec;
static struct Library *DOSBase = NULL;
static struct DOSIFace *IDOS = NULL;
#endif

static OFFileManager *defaultManager;

#ifdef OF_AMIGAOS
static bool dirChanged = false;
static BPTR originalDirLock = 0;

OF_DESTRUCTOR()
{
	if (dirChanged)
		UnLock(CurrentDir(originalDirLock));

# ifdef OF_AMIGAOS4
	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
# endif
}
#endif

Modified src/OFLocale.m from [eba1e0de33] to [d924c68c15].

48
49
50
51
52
53
54
55

56
57
58
59
60
61

62
63
64
65
66
67
68
48
49
50
51
52
53
54

55
56
57
58
59
60

61
62
63
64
65
66
67
68







-
+





-
+







static struct DOSIFace *IDOS = NULL;
static struct Library *LocaleBase = NULL;
static struct LocaleIFace *ILocale = NULL;

OF_DESTRUCTOR()
{
	if (ILocale != NULL)
		DropInterface(ILocale);
		DropInterface((struct Interface *)ILocale);

	if (LocaleBase != NULL)
		CloseLibrary(LocaleBase);

	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
}
#endif

#ifndef OF_AMIGAOS

Modified src/OFStdIOStream.m from [78d2467bd8] to [29dc6410b2].

76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
76
77
78
79
80
81
82

83
84
85
86
87
88
89
90







-
+







{
	[of_stdin dealloc];
	[of_stdout dealloc];
	[of_stderr dealloc];

# ifdef OF_AMIGAOS4
	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
# endif
}
#endif

Modified src/OFThread.m from [5653a804be] to [67db96fe50].

97
98
99
100
101
102
103
104

105
106
107
108
109
110
111
97
98
99
100
101
102
103

104
105
106
107
108
109
110
111







-
+







extern struct ExecIFace *IExec;
static struct Library *DOSBase = NULL;
static struct DOSIFace *IDOS = NULL;

OF_DESTRUCTOR()
{
	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
}
#endif

#if defined(OF_HAVE_THREADS)

Modified src/OFURLHandler_file.m from [a20f05e1cc] to [c1234df85c].

122
123
124
125
126
127
128
129

130
131
132
133
134
135

136
137
138
139
140
141
142
122
123
124
125
126
127
128

129
130
131
132
133
134

135
136
137
138
139
140
141
142







-
+





-
+







static struct DOSIFace *IDOS = NULL;
static struct Library *LocaleBase = NULL;
static struct LocaleIFace *ILocale = NULL;

OF_DESTRUCTOR()
{
	if (ILocale != NULL)
		DropInterface(ILocale);
		DropInterface((struct Interface *)ILocale);

	if (LocaleBase != NULL)
		CloseLibrary(LocaleBase);

	if (IDOS != NULL)
		DropInterface(IDOS);
		DropInterface((struct Interface *)IDOS);

	if (DOSBase != NULL)
		CloseLibrary(DOSBase);
}
#endif

#ifdef OF_WINDOWS