diff --git a/include/stdlib.h b/include/stdlib.h index 75eded7d..e529f086 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -39,7 +39,7 @@ void * calloc (size_t nmemb, size_t size); void exit (int); void free (void *ptr); char* getenv (char const* s); -int settenv (char const* s, char const* v, int overwrite_p); +int setenv (char const* s, char const* v, int overwrite_p); void *malloc (size_t); void qsort (void *base, size_t nmemb, size_t size, int (*compar)(void const *, void const *)); void *realloc (void *p, size_t size); diff --git a/lib/libc.c b/lib/libc.c index 2819468c..1427ba2d 100644 --- a/lib/libc.c +++ b/lib/libc.c @@ -279,7 +279,7 @@ malloc (size_t size) { if (!g_brk) g_brk = brk (0); - if (brk (g_brk + size) == -1) + if (brk (g_brk + size) == (void*)-1) return 0; char *p = g_brk; g_brk += size; @@ -290,7 +290,7 @@ void * memcpy (void *dest, void const *src, size_t n) { char* p = dest; - char* q = src; + char const* q = src; while (n--) *p++ = *q++; return dest; } diff --git a/src/gc.c b/src/gc.c index 71751252..6f34aeba 100644 --- a/src/gc.c +++ b/src/gc.c @@ -177,9 +177,9 @@ gc_ () ///((internal)) if (g_debug > 2) { eputs (" up["); - eputs (itoa (g_cells)); + eputs (itoa ((unsigned long)g_cells)); eputs (","); - eputs (itoa (g_news)); + eputs (itoa ((unsigned long)g_news)); eputs (":"); eputs (itoa (ARENA_SIZE)); eputs (","); diff --git a/src/posix.c b/src/posix.c index e8ec52a1..5986020b 100644 --- a/src/posix.c +++ b/src/posix.c @@ -18,7 +18,9 @@ * along with Mes. If not, see . */ +#include #include +#include #include int @@ -203,7 +205,7 @@ force_output (SCM p) ///((arity . n)) SCM chmod_ (SCM file_name, SCM mode) ///((name . "chmod")) { - return chmod (string_to_cstring (file_name), VALUE (mode)); + chmod (string_to_cstring (file_name), VALUE (mode)); return cell_unspecified; }