diff options
| author | grischka <grischka> | 2011-08-01 01:10:36 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2011-08-01 01:10:36 +0200 |
| commit | df9cce24a87442079d878978e56caa0787f37e1a (patch) | |
| tree | 9758c048385bdf2181f67ce835fa140ce8119a95 /tccelf.c | |
| parent | 626a9074512c6c6ba060dc8a4a0d1caa49db76c1 (diff) | |
| download | tinycc-df9cce24a87442079d878978e56caa0787f37e1a.tar.gz tinycc-df9cce24a87442079d878978e56caa0787f37e1a.tar.bz2 | |
Accept colon separated paths with -L and -I
This allows passing colon separated paths to
tcc_add_library_path
tcc_add_sysinclude_path
tcc_add_include_path
Also there are new configure variables
CONFIG_TCC_LIBPATH
CONFIG_TCC_SYSINCLUDE_PATHS
which define the lib/sysinclude paths all in one and can
be overridden from configure/make
For TCC_TARGET_PE semicolons (;) are used as separators
Also, \b in the path string is replaced by s->tcc_lib_path
(CONFIG_TCCDIR rsp. -B option)
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -2857,13 +2857,6 @@ static int ld_next(TCCState *s1, char *name, int name_size) return c; } -char *tcc_strcpy_part(char *out, const char *in, size_t num) -{ - memcpy(out, in, num); - out[num] = '\0'; - return out; -} - /* * Extract the library name from the file name * Return 0 if the file isn't a library @@ -2886,20 +2879,20 @@ static int filename_to_libname(TCCState *s1, const char filename[], char libname #ifdef TCC_TARGET_PE if (!strcmp(ext, ".def")) { size_t len = ext - filename; - tcc_strcpy_part(libname, filename, len); + pstrncpy(libname, filename, len); return 1; } #else if (libprefix && (!strcmp(ext, ".so"))) { size_t len = ext - filename - 3; - tcc_strcpy_part(libname, filename + 3, len); + pstrncpy(libname, filename + 3, len); return 1; } #endif } else { if (libprefix && (!strcmp(ext, ".a"))) { size_t len = ext - filename - 3; - tcc_strcpy_part(libname, filename + 3, len); + pstrncpy(libname, filename + 3, len); return 1; } } |
