diff --git a/lang/cem/libcc.ansi/build.lua b/lang/cem/libcc.ansi/build.lua index fce3470af..7536d002f 100644 --- a/lang/cem/libcc.ansi/build.lua +++ b/lang/cem/libcc.ansi/build.lua @@ -34,6 +34,7 @@ for _, plat in ipairs(vars.plats) do "+ctype_files", "+ctype_tab", "./pure/string/*.c", + "./pure/stdlib/*.c", "./ctype/*.c", "./errno/*.c", "./locale/*.c", diff --git a/lang/cem/libcc.ansi/stdlib/abs.c b/lang/cem/libcc.ansi/pure/stdlib/abs.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/abs.c rename to lang/cem/libcc.ansi/pure/stdlib/abs.c diff --git a/lang/cem/libcc.ansi/stdlib/atoi.c b/lang/cem/libcc.ansi/pure/stdlib/atoi.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/atoi.c rename to lang/cem/libcc.ansi/pure/stdlib/atoi.c diff --git a/lang/cem/libcc.ansi/stdlib/atol.c b/lang/cem/libcc.ansi/pure/stdlib/atol.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/atol.c rename to lang/cem/libcc.ansi/pure/stdlib/atol.c diff --git a/lang/cem/libcc.ansi/stdlib/bsearch.c b/lang/cem/libcc.ansi/pure/stdlib/bsearch.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/bsearch.c rename to lang/cem/libcc.ansi/pure/stdlib/bsearch.c diff --git a/lang/cem/libcc.ansi/stdlib/div.c b/lang/cem/libcc.ansi/pure/stdlib/div.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/div.c rename to lang/cem/libcc.ansi/pure/stdlib/div.c diff --git a/lang/cem/libcc.ansi/stdlib/getenv.c b/lang/cem/libcc.ansi/pure/stdlib/getenv.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/getenv.c rename to lang/cem/libcc.ansi/pure/stdlib/getenv.c diff --git a/lang/cem/libcc.ansi/stdlib/labs.c b/lang/cem/libcc.ansi/pure/stdlib/labs.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/labs.c rename to lang/cem/libcc.ansi/pure/stdlib/labs.c diff --git a/lang/cem/libcc.ansi/stdlib/ldiv.c b/lang/cem/libcc.ansi/pure/stdlib/ldiv.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/ldiv.c rename to lang/cem/libcc.ansi/pure/stdlib/ldiv.c diff --git a/lang/cem/libcc.ansi/stdlib/mblen.c b/lang/cem/libcc.ansi/pure/stdlib/mblen.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/mblen.c rename to lang/cem/libcc.ansi/pure/stdlib/mblen.c diff --git a/lang/cem/libcc.ansi/stdlib/mbstowcs.c b/lang/cem/libcc.ansi/pure/stdlib/mbstowcs.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/mbstowcs.c rename to lang/cem/libcc.ansi/pure/stdlib/mbstowcs.c diff --git a/lang/cem/libcc.ansi/stdlib/mbtowc.c b/lang/cem/libcc.ansi/pure/stdlib/mbtowc.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/mbtowc.c rename to lang/cem/libcc.ansi/pure/stdlib/mbtowc.c diff --git a/lang/cem/libcc.ansi/stdlib/putenv.c b/lang/cem/libcc.ansi/pure/stdlib/putenv.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/putenv.c rename to lang/cem/libcc.ansi/pure/stdlib/putenv.c diff --git a/lang/cem/libcc.ansi/stdlib/qsort.c b/lang/cem/libcc.ansi/pure/stdlib/qsort.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/qsort.c rename to lang/cem/libcc.ansi/pure/stdlib/qsort.c diff --git a/lang/cem/libcc.ansi/stdlib/rand.c b/lang/cem/libcc.ansi/pure/stdlib/rand.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/rand.c rename to lang/cem/libcc.ansi/pure/stdlib/rand.c diff --git a/lang/cem/libcc.ansi/stdlib/setenv.c b/lang/cem/libcc.ansi/pure/stdlib/setenv.c similarity index 97% rename from lang/cem/libcc.ansi/stdlib/setenv.c rename to lang/cem/libcc.ansi/pure/stdlib/setenv.c index e6f7b8d88..c973bd58a 100644 --- a/lang/cem/libcc.ansi/stdlib/setenv.c +++ b/lang/cem/libcc.ansi/pure/stdlib/setenv.c @@ -64,7 +64,7 @@ int setenv(register const char* name, register const char* value, int rewrite) environ[cnt + 1] = NULL; offset = cnt; } - for (C = name; *C && *C != '='; ++C) + for (C = (char*) name; *C && *C != '='; ++C) ; /* no `=' in name */ if (!(environ[offset] = /* name + `=' + value */ malloc((unsigned)((int)(C - name) + l_value + 2)))) diff --git a/lang/cem/libcc.ansi/stdlib/strtol.c b/lang/cem/libcc.ansi/pure/stdlib/strtol.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/strtol.c rename to lang/cem/libcc.ansi/pure/stdlib/strtol.c diff --git a/lang/cem/libcc.ansi/stdlib/wcstombs.c b/lang/cem/libcc.ansi/pure/stdlib/wcstombs.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/wcstombs.c rename to lang/cem/libcc.ansi/pure/stdlib/wcstombs.c diff --git a/lang/cem/libcc.ansi/stdlib/wctomb.c b/lang/cem/libcc.ansi/pure/stdlib/wctomb.c similarity index 100% rename from lang/cem/libcc.ansi/stdlib/wctomb.c rename to lang/cem/libcc.ansi/pure/stdlib/wctomb.c