From 2c2e261648d5ae1befe5c4f269a655cc06b6e1e9 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 27 Aug 2010 12:38:25 +0000 Subject: Use system headers a bit more: use host's fcntl.h for O_RDONLY etc. Removes the need to fix up those in the simulator. Also work around some posix-mingw incompatibilities (e.g. getcwd()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/load_code.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'firmware/export/load_code.h') diff --git a/firmware/export/load_code.h b/firmware/export/load_code.h index f4fa8f9b46..e37af786df 100644 --- a/firmware/export/load_code.h +++ b/firmware/export/load_code.h @@ -42,7 +42,13 @@ static inline void lc_close(void *handle) { (void)handle; } /* don't call these directly for loading code * they're to be wrapped by platform specific functions */ -extern void *_lc_open(const char *filename, char *buf, size_t buf_size); +#ifdef WIN32 +/* windows' LoadLibrary can only handle ucs2, no utf-8 */ +#define _lc_open_char wchar_t +#else +#define _lc_open_char char +#endif +extern void *_lc_open(const _lc_open_char *filename, char *buf, size_t buf_size); extern void *_lc_get_header(void *handle); extern void _lc_close(void *handle); -- cgit v1.2.3