diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-21 11:20:20 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-21 11:20:20 +0100 |
| commit | 8a81f9e1036637e21a47e14fb56bf64133546890 (patch) | |
| tree | fc7150b5f69bf24ddfe3bc0a7b94f4f23ec05926 /libtcc.c | |
| parent | 05fa2e754b1f36f9dfb9e63b5c095765d64dd651 (diff) | |
| download | tinycc-8a81f9e1036637e21a47e14fb56bf64133546890.tar.gz tinycc-8a81f9e1036637e21a47e14fb56bf64133546890.tar.bz2 | |
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.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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; } |
