X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=kernel%2Finclude%2Fkern%2Flibc.h;fp=kernel%2Finclude%2Fkern%2Flibc.h;h=1867a6da9d9602f79e909aec21f4fb837b4b6bd1;hp=05f398b8d9ee837fda7c4232412a3eb2dfb55eaa;hb=4b46e0122596ab988ca1c2045464ad7c2af0358b;hpb=bcba00f20216db4b6f42fdf2a06e0590df336023 diff --git a/kernel/include/kern/libc.h b/kernel/include/kern/libc.h index 05f398b..1867a6d 100644 --- a/kernel/include/kern/libc.h +++ b/kernel/include/kern/libc.h @@ -4,16 +4,15 @@ #include #include -size_t vsnprintf(char *buf, size_t size, const char *str, va_list args); -size_t snprintf(char *buf, size_t size, const char *str, ...) -__attribute__((format(printf, 3, 4))); -size_t sprintf(char *buf, const char *str, ...) -__attribute__((format(printf, 2, 3))); -size_t printf(const char *str, ...) -__attribute__((format(printf, 1, 2))); - -// These are C-ABI so libgcc and libsupc++ can use them. extern "C" { + size_t vsnprintf(char *buf, size_t size, const char *str, va_list args); + size_t snprintf(char *buf, size_t size, const char *str, ...) + __attribute__((format(printf, 3, 4))); + size_t sprintf(char *buf, const char *str, ...) + __attribute__((format(printf, 2, 3))); + size_t printf(const char *str, ...) + __attribute__((format(printf, 1, 2))); + // FIXME: template/alignof versions void *memcpy(void *dest, const void *src, size_t len); void *memmove(void *dest, const void *src, size_t len);