From 50a6ca39ad4ed01922aa4f755f0ca579788226cf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 May 2010 21:04:40 +0000 Subject: Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index 5f594e6cf5..e6e41e1a3f 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -32,11 +32,13 @@ #endif #include +#include #include #include #include #include #include +#include "string-extra.h" char* strncpy(char *, const char *, size_t); void* plugin_get_buffer(size_t *buffer_size); @@ -111,6 +113,11 @@ void* plugin_get_buffer(size_t *buffer_size); #include "usbstack/usb_hid_usage_tables.h" #endif + +/* on some platforms strcmp() seems to be a tricky define which + * breaks if we write down strcmp's prototype */ +#undef strcmp + #ifdef PLUGIN #if defined(DEBUG) || defined(SIMULATOR) @@ -529,7 +536,7 @@ struct plugin_api { /* strings and memory */ int (*snprintf)(char *buf, size_t size, const char *fmt, ...) ATTRIBUTE_PRINTF(3, 4); - int (*vsnprintf)(char *buf, int size, const char *fmt, va_list ap); + int (*vsnprintf)(char *buf, size_t size, const char *fmt, va_list ap); char* (*strcpy)(char *dst, const char *src); size_t (*strlcpy)(char *dst, const char *src, size_t length); size_t (*strlen)(const char *str); -- cgit v1.2.3