From 8a81f9e1036637e21a47e14fb56bf64133546890 Mon Sep 17 00:00:00 2001 From: James Lyon Date: Sun, 21 Apr 2013 11:20:20 +0100 Subject: Added CMake build system (to facilitate Win64 builds) Win32 build and tests work under CMake, however I haven't added install code yet. Win64 build fails due to chkstk.S failing to assemble. --- libtcc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 9ee4ea6..bf88cc9 100644 --- a/libtcc.c +++ b/libtcc.c @@ -80,12 +80,19 @@ ST_FUNC void asm_global_instr(void) /********************************************************/ #ifdef _WIN32 +// GCC appears to use '/' for relative paths and '\\' for absolute paths on Windows static char *normalize_slashes(char *path) { char *p; - for (p = path; *p; ++p) - if (*p == '\\') - *p = '/'; + if (path[1] == ':') { + for (p = path+2; *p; ++p) + if (*p == '/') + *p = '\\'; + } else { + for (p = path; *p; ++p) + if (*p == '\\') + *p = '/'; + } return path; } -- cgit v1.3.1