forked from Vhex-Kernel-Core/fxlibc
Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Lephenixnoir | e7325c5ace | |
Lephenixnoir | a7ae52b4c4 |
|
@ -145,6 +145,8 @@ set(SOURCES
|
|||
src/stdio/snprintf.c
|
||||
src/stdio/sprintf.c
|
||||
src/stdio/streams.c
|
||||
src/stdio/tmpfile.c
|
||||
src/stdio/tmpnam.c
|
||||
src/stdio/ungetc.c
|
||||
src/stdio/vasprintf.c
|
||||
src/stdio/vdprintf.c
|
||||
|
@ -162,6 +164,7 @@ set(SOURCES
|
|||
src/stdlib/calloc.c
|
||||
src/stdlib/div.c
|
||||
src/stdlib/exit.c
|
||||
src/stdlib/getenv.c
|
||||
src/stdlib/labs.c
|
||||
src/stdlib/ldiv.c
|
||||
src/stdlib/llabs.c
|
||||
|
@ -177,6 +180,7 @@ set(SOURCES
|
|||
src/stdlib/strtoll.c
|
||||
src/stdlib/strtoul.c
|
||||
src/stdlib/strtoull.c
|
||||
src/stdlib/system.c
|
||||
# string
|
||||
src/string/memchr.c
|
||||
src/string/memcmp.c
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
FILE *tmpfile(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
char *tmpnam(char *s)
|
||||
{
|
||||
(void)s;
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
char *getenv(char const *name)
|
||||
{
|
||||
(void)name;
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
int system(char const *command)
|
||||
{
|
||||
/* No command: determine whether there is a shell */
|
||||
if(!command)
|
||||
return 0;
|
||||
|
||||
/* Command: pretend it fails and return 1 */
|
||||
return 1;
|
||||
}
|
|
@ -18,12 +18,12 @@ static const char *month_names[12] = {
|
|||
}; break
|
||||
/* Perform a sub-call to strftime to expand a complex format */
|
||||
#define do_strftime(fmt) { \
|
||||
size_t _written = strftime2(s+len, n-len, fmt, time); \
|
||||
size_t _written = strftime(s+len, n-len, fmt, time); \
|
||||
if(_written == 0) goto full; \
|
||||
len += _written; \
|
||||
}; break
|
||||
|
||||
size_t strftime2(char * restrict s, size_t n, const char * restrict format,
|
||||
size_t strftime(char * restrict s, size_t n, const char * restrict format,
|
||||
const struct tm * restrict time)
|
||||
{
|
||||
size_t len = 0;
|
||||
|
|
Loading…
Reference in New Issue