From 78f1c10e0f10770880d50d917910adfdedd646a2 Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 3 Oct 2016 12:29:38 +0200 Subject: configure: fix tcc_lddir, cpu ... and other minor cosmetic fixes --- libtcc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 0f7e476..7cfd054 100644 --- a/libtcc.c +++ b/libtcc.c @@ -116,7 +116,7 @@ static void tcc_add_systemdir(TCCState *s) } #endif -#ifndef CONFIG_TCC_STATIC +#if defined TCC_IS_NATIVE && !defined CONFIG_TCC_STATIC static void dlclose(void *p) { FreeLibrary((HMODULE)p); @@ -481,8 +481,10 @@ static void tcc_split_path(TCCState *s, void ***p_ary, int *p_nb_ary, const char cstr_ccat(&str, c); } } - cstr_ccat(&str, '\0'); - dynarray_add(p_ary, p_nb_ary, tcc_strdup(str.data)); + if (str.size) { + cstr_ccat(&str, '\0'); + dynarray_add(p_ary, p_nb_ary, tcc_strdup(str.data)); + } cstr_free(&str); in = p+1; } while (*p); -- cgit v1.3.1