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/plugins/lib/buflib.c | 4 ++-- apps/plugins/lib/jhash.h | 4 ++-- apps/plugins/lib/strncpy.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/buflib.c b/apps/plugins/lib/buflib.c index 5d03ca4bb9..930e49d02e 100644 --- a/apps/plugins/lib/buflib.c +++ b/apps/plugins/lib/buflib.c @@ -23,8 +23,8 @@ * ****************************************************************************/ +#include /* for abs() */ #include "buflib.h" - /* The main goal of this design is fast fetching of the pointer for a handle. * For that reason, the handles are stored in a table at the end of the buffer * with a fixed address, so that returning the pointer for a handle is a simple @@ -311,7 +311,7 @@ buflib_free(struct buflib_context *ctx, int handle_num) while (next_block < freed_block) { block = next_block; - next_block += ABS(block->val); + next_block += abs(block->val); } /* If next_block == block, the above loop didn't go anywhere. If it did, * and the block before this one is empty, we can combine them. diff --git a/apps/plugins/lib/jhash.h b/apps/plugins/lib/jhash.h index 97d1ac3d93..7699e24587 100644 --- a/apps/plugins/lib/jhash.h +++ b/apps/plugins/lib/jhash.h @@ -24,8 +24,8 @@ #ifndef _LIB_JHASH_H_ #define _LIB_JHASH_H_ #include /* defines uint32_t etc */ -#include -#include +#include /* size_t */ +#include "plugin.h" /* hashw() -- hash an array of uint32_t into a 32-bit value diff --git a/apps/plugins/lib/strncpy.c b/apps/plugins/lib/strncpy.c index 7c1973ba66..f80e759969 100644 --- a/apps/plugins/lib/strncpy.c +++ b/apps/plugins/lib/strncpy.c @@ -39,6 +39,7 @@ QUICKREF #include #include +#include "plugin.h" /*SUPPRESS 560*/ /*SUPPRESS 530*/ -- cgit v1.2.3