diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
| commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
| tree | c7881b015b220558167310345b162324c96be15a /apps/plugin.h | |
| parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
| download | rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.bz2 rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.xz | |
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
Diffstat (limited to 'apps/plugin.h')
| -rw-r--r-- | apps/plugin.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 5f594e6..e6e41e1 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -32,11 +32,13 @@ #endif #include <stdbool.h> +#include <inttypes.h> #include <sys/types.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#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); |