core: Fix compile warnings.
* src/posix.c: Include sys/stat.h. (chmod): Return cell_unspecified. * include/stdlib.h: Typo.
This commit is contained in:
parent
5f7f2c9894
commit
865e72ae8a
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
4
src/gc.c
4
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 (",");
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue