From 805fc37a06b41d6a52b2994dcfda794b0e476b4d Mon Sep 17 00:00:00 2001 From: Xavi Del Campo Date: Sat, 1 Feb 2020 00:51:53 +0100 Subject: Added missing extern "C" --- libpsx/include/stdio.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'libpsx/include/stdio.h') diff --git a/libpsx/include/stdio.h b/libpsx/include/stdio.h index 1bf7a99..88e7afb 100644 --- a/libpsx/include/stdio.h +++ b/libpsx/include/stdio.h @@ -8,7 +8,7 @@ #ifdef _PSXSDK_WRAPPER /* - * Dirty hack... + * Dirty hack... */ #include "/usr/include/stdio.h" @@ -20,6 +20,11 @@ #include #include +#ifdef __cplusplus +extern "C" +{ +#endif + #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 @@ -58,7 +63,7 @@ typedef struct /** Current file position */ unsigned int pos; /** File access mode */ - unsigned int mode; + unsigned int mode; /** Device ID */ unsigned int dev; /** Size in bytes */ @@ -134,7 +139,7 @@ int remove(const char *filename); /** * Redirects STDIO to SIO (serial port) */ - + void redirect_stdio_to_sio(void); /** @@ -144,21 +149,21 @@ void redirect_stdio_to_sio(void); * * @param setting New status of the setting (0 = disabled, 1 = enabled) */ - + void sio_stdio_mapcr(unsigned int setting); /** * scanf and friends */ - + int vsscanf(const char *str, const char *fmt, va_list ap); int sscanf(const char *str, const char *fmt, ...); /** - * STDIO for SIO + * STDIO for SIO */ - + int sio_putchar(int c); int sio_puts(const char *str); int sio_printf(const char *fmt, ...); @@ -166,5 +171,8 @@ int sio_vprintf(const char *fmt, va_list ap); #endif +#ifdef __cplusplus +} #endif +#endif -- cgit v1.2.3