ObjFW  Check-in [c162213e4a]

Overview
Comment:Do not use lstat() on Nintendo 3DS

lstat() exists, but just crashes.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c162213e4aaa4e5c81b6cdea9ef463ad8255893e71590a447b6ddef9a3c80c13
User & Date: js on 2018-08-19 01:04:03
Other Links: manifest | tags
Context
2018-08-19
01:13
Don't use nanosleep() on Nintendo 3DS check-in: 06255a6aa8 user: js tags: trunk
01:04
Do not use lstat() on Nintendo 3DS check-in: c162213e4a user: js tags: trunk
2018-08-18
23:10
Path handling for Nintendo 3DS check-in: b519963535 user: js tags: trunk
Changes

Modified src/OFURLHandler_file.m from [dad1460ce8] to [f04b110da0].

228
229
230
231
232
233
234
235

236
237
238
239
240
241
242
	return stat([path cStringWithEncoding: [OFLocale encoding]], buffer);
#endif
}

static int
of_lstat(OFString *path, of_stat_t *buffer)
{
#if defined(HAVE_LSTAT) && !defined(OF_WINDOWS) && !defined(OF_AMIGAOS)

# ifdef OF_HAVE_OFF64_T
	return lstat64([path cStringWithEncoding: [OFLocale encoding]], buffer);
# else
	return lstat([path cStringWithEncoding: [OFLocale encoding]], buffer);
# endif
#else
	return of_stat(path, buffer);







|
>







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
	return stat([path cStringWithEncoding: [OFLocale encoding]], buffer);
#endif
}

static int
of_lstat(OFString *path, of_stat_t *buffer)
{
#if defined(HAVE_LSTAT) && !defined(OF_WINDOWS) && !defined(OF_AMIGAOS) && \
    !defined(OF_NINTENDO_3DS)
# ifdef OF_HAVE_OFF64_T
	return lstat64([path cStringWithEncoding: [OFLocale encoding]], buffer);
# else
	return lstat([path cStringWithEncoding: [OFLocale encoding]], buffer);
# endif
#else
	return of_stat(path, buffer);