summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-06 21:04:40 +0000
commit50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch)
treec7881b015b220558167310345b162324c96be15a /apps/plugin.h
parentadb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff)
downloadrockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz
rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip
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.h9
1 files changed, 8 insertions, 1 deletions
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 @@
32#endif 32#endif
33 33
34#include <stdbool.h> 34#include <stdbool.h>
35#include <inttypes.h>
35#include <sys/types.h> 36#include <sys/types.h>
36#include <stdarg.h> 37#include <stdarg.h>
37#include <stdio.h> 38#include <stdio.h>
38#include <stdlib.h> 39#include <stdlib.h>
39#include <string.h> 40#include <string.h>
41#include "string-extra.h"
40 42
41char* strncpy(char *, const char *, size_t); 43char* strncpy(char *, const char *, size_t);
42void* plugin_get_buffer(size_t *buffer_size); 44void* plugin_get_buffer(size_t *buffer_size);
@@ -111,6 +113,11 @@ void* plugin_get_buffer(size_t *buffer_size);
111#include "usbstack/usb_hid_usage_tables.h" 113#include "usbstack/usb_hid_usage_tables.h"
112#endif 114#endif
113 115
116
117/* on some platforms strcmp() seems to be a tricky define which
118 * breaks if we write down strcmp's prototype */
119#undef strcmp
120
114#ifdef PLUGIN 121#ifdef PLUGIN
115 122
116#if defined(DEBUG) || defined(SIMULATOR) 123#if defined(DEBUG) || defined(SIMULATOR)
@@ -529,7 +536,7 @@ struct plugin_api {
529 /* strings and memory */ 536 /* strings and memory */
530 int (*snprintf)(char *buf, size_t size, const char *fmt, ...) 537 int (*snprintf)(char *buf, size_t size, const char *fmt, ...)
531 ATTRIBUTE_PRINTF(3, 4); 538 ATTRIBUTE_PRINTF(3, 4);
532 int (*vsnprintf)(char *buf, int size, const char *fmt, va_list ap); 539 int (*vsnprintf)(char *buf, size_t size, const char *fmt, va_list ap);
533 char* (*strcpy)(char *dst, const char *src); 540 char* (*strcpy)(char *dst, const char *src);
534 size_t (*strlcpy)(char *dst, const char *src, size_t length); 541 size_t (*strlcpy)(char *dst, const char *src, size_t length);
535 size_t (*strlen)(const char *str); 542 size_t (*strlen)(const char *str);