Compare commits
No commits in common. "9b778254f157bd852e8612e5abd57faf0d71fab5" and "d6f45c284e4bf2bf6d05f0b66968b9cb3b529dc3" have entirely different histories.
9b778254f1
...
d6f45c284e
@ -15,6 +15,6 @@ int main()
|
|||||||
printf("Allocating 4 MB of memory... %lx\n", (unsigned long)allocated);
|
printf("Allocating 4 MB of memory... %lx\n", (unsigned long)allocated);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
} while ((allocated = malloc(CHUNK)));
|
} while ((allocated = malloc(CHUNK)));
|
||||||
perror("malloc");
|
printf("Out of memory. (errno=%d, %s)\n", errno, strerror(errno));
|
||||||
printf("Press any key to restart.\n");
|
printf("Press any key to restart.\n");
|
||||||
}
|
}
|
@ -35,7 +35,6 @@ extern "C"
|
|||||||
int vsprintf(char*, const char*, va_list);
|
int vsprintf(char*, const char*, va_list);
|
||||||
int vsnprintf(char*, size_t, const char*, va_list);
|
int vsnprintf(char*, size_t, const char*, va_list);
|
||||||
int puts(const char*);
|
int puts(const char*);
|
||||||
void perror(const char*);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include <errno.h>
|
|
||||||
#include <luna.h>
|
#include <luna.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -79,9 +78,4 @@ extern "C"
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
void perror(const char* s) // FIXME: Print to stderr, whenever we have an stderr.
|
|
||||||
{
|
|
||||||
if (s && *s) { printf("%s: ", s); }
|
|
||||||
printf("%s\n", strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user