summaryrefslogtreecommitdiff
path: root/apps/codecs/libFLAC
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-28 20:55:31 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-28 20:55:31 +0000
commitb363d656252eed5720e9f172dafa7b56ac66a994 (patch)
tree0e42dd388ea71cd83ee40b5007bb813cd1946dad /apps/codecs/libFLAC
parentc080f7e19e96a88e9711417ac039f082b11f2655 (diff)
Get malloc() and friends out of the way for the cygwin linker (and maybe others), to make plugins work properly in the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6086 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libFLAC')
-rw-r--r--apps/codecs/libFLAC/bitbuffer.c2
-rw-r--r--apps/codecs/libFLAC/cpu.c2
-rw-r--r--apps/codecs/libFLAC/file_decoder.c2
-rw-r--r--apps/codecs/libFLAC/file_encoder.c2
-rw-r--r--apps/codecs/libFLAC/format.c2
-rw-r--r--apps/codecs/libFLAC/include/FLAC/callback.h2
-rw-r--r--apps/codecs/libFLAC/include/global.h3
-rw-r--r--apps/codecs/libFLAC/include/private/memory.h2
-rw-r--r--apps/codecs/libFLAC/md5.c2
-rw-r--r--apps/codecs/libFLAC/memory.c1
-rw-r--r--apps/codecs/libFLAC/metadata_iterators.c2
-rw-r--r--apps/codecs/libFLAC/metadata_object.c2
-rw-r--r--apps/codecs/libFLAC/seekable_stream_decoder.c2
-rw-r--r--apps/codecs/libFLAC/seekable_stream_encoder.c2
-rw-r--r--apps/codecs/libFLAC/stream_decoder.c2
-rw-r--r--apps/codecs/libFLAC/stream_encoder.c2
16 files changed, 18 insertions, 14 deletions
diff --git a/apps/codecs/libFLAC/bitbuffer.c b/apps/codecs/libFLAC/bitbuffer.c
index 552a326ec2..fa9786e1f5 100644
--- a/apps/codecs/libFLAC/bitbuffer.c
+++ b/apps/codecs/libFLAC/bitbuffer.c
@@ -29,7 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for memcpy(), memset() */
#include "private/bitbuffer.h"
#include "private/bitmath.h"
diff --git a/apps/codecs/libFLAC/cpu.c b/apps/codecs/libFLAC/cpu.c
index 1e6b27994f..54101e4a63 100644
--- a/apps/codecs/libFLAC/cpu.c
+++ b/apps/codecs/libFLAC/cpu.c
@@ -30,7 +30,7 @@
*/
#include "private/cpu.h"
-#include <stdlib.h>
+#include "global.h"
#include <stdio.h>
#ifdef HAVE_CONFIG_H
diff --git a/apps/codecs/libFLAC/file_decoder.c b/apps/codecs/libFLAC/file_decoder.c
index 29d489587a..f0a3ea170e 100644
--- a/apps/codecs/libFLAC/file_decoder.c
+++ b/apps/codecs/libFLAC/file_decoder.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for strcmp() */
#include <sys/stat.h> /* for stat() */
#if defined _MSC_VER || defined __MINGW32__
diff --git a/apps/codecs/libFLAC/file_encoder.c b/apps/codecs/libFLAC/file_encoder.c
index db4c421f98..5af8471fc0 100644
--- a/apps/codecs/libFLAC/file_encoder.c
+++ b/apps/codecs/libFLAC/file_encoder.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for strlen(), strcpy() */
#include "FLAC/assert.h"
#include "protected/file_encoder.h"
diff --git a/apps/codecs/libFLAC/format.c b/apps/codecs/libFLAC/format.c
index 25ec7d98b6..ebc3fb2240 100644
--- a/apps/codecs/libFLAC/format.c
+++ b/apps/codecs/libFLAC/format.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for qsort() */
+#include "global.h" /* for qsort() */
#include "FLAC/assert.h"
#include "FLAC/format.h"
#include "private/format.h"
diff --git a/apps/codecs/libFLAC/include/FLAC/callback.h b/apps/codecs/libFLAC/include/FLAC/callback.h
index c6f94c0cf4..5c23d04856 100644
--- a/apps/codecs/libFLAC/include/FLAC/callback.h
+++ b/apps/codecs/libFLAC/include/FLAC/callback.h
@@ -33,7 +33,7 @@
#define FLAC__CALLBACK_H
#include "ordinals.h"
-#include <stdlib.h> /* for size_t */
+#include <sys/types.h> /* for size_t */
/** \file include/FLAC/callback.h
*
diff --git a/apps/codecs/libFLAC/include/global.h b/apps/codecs/libFLAC/include/global.h
new file mode 100644
index 0000000000..64c1a32e60
--- /dev/null
+++ b/apps/codecs/libFLAC/include/global.h
@@ -0,0 +1,3 @@
+/* global include file for libFLAC/rockbox */
+
+#include "../../codec.h"
diff --git a/apps/codecs/libFLAC/include/private/memory.h b/apps/codecs/libFLAC/include/private/memory.h
index fca808155b..fc6b7aeb35 100644
--- a/apps/codecs/libFLAC/include/private/memory.h
+++ b/apps/codecs/libFLAC/include/private/memory.h
@@ -36,7 +36,7 @@
#include <config.h>
#endif
-#include <stdlib.h> /* for size_t */
+#include <sys/types.h> /* for size_t */
#include "private/float.h"
#include "FLAC/ordinals.h" /* for FLAC__bool */
diff --git a/apps/codecs/libFLAC/md5.c b/apps/codecs/libFLAC/md5.c
index 9679387db9..a9154e0980 100644
--- a/apps/codecs/libFLAC/md5.c
+++ b/apps/codecs/libFLAC/md5.c
@@ -23,7 +23,7 @@
* Still in the public domain.
*/
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for memcpy() */
#include "private/md5.h"
diff --git a/apps/codecs/libFLAC/memory.c b/apps/codecs/libFLAC/memory.c
index 9718b261b8..d93ace693e 100644
--- a/apps/codecs/libFLAC/memory.c
+++ b/apps/codecs/libFLAC/memory.c
@@ -29,6 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "global.h" /* for malloc() */
#include "private/memory.h"
#include "FLAC/assert.h"
diff --git a/apps/codecs/libFLAC/metadata_iterators.c b/apps/codecs/libFLAC/metadata_iterators.c
index 2d50dd2bdb..880f66c06c 100644
--- a/apps/codecs/libFLAC/metadata_iterators.c
+++ b/apps/codecs/libFLAC/metadata_iterators.c
@@ -31,7 +31,7 @@
#include <errno.h>
#include <stdio.h>
-#include <stdlib.h>
+#include "global.h"
#include <string.h>
#if defined _MSC_VER || defined __MINGW32__
diff --git a/apps/codecs/libFLAC/metadata_object.c b/apps/codecs/libFLAC/metadata_object.c
index 290036ce26..51663c0ab4 100644
--- a/apps/codecs/libFLAC/metadata_object.c
+++ b/apps/codecs/libFLAC/metadata_object.c
@@ -29,7 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdlib.h>
+#include "global.h"
#include <string.h>
#include "private/metadata.h"
diff --git a/apps/codecs/libFLAC/seekable_stream_decoder.c b/apps/codecs/libFLAC/seekable_stream_decoder.c
index 53026068ff..7aa215bed5 100644
--- a/apps/codecs/libFLAC/seekable_stream_decoder.c
+++ b/apps/codecs/libFLAC/seekable_stream_decoder.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for calloc() */
+#include "global.h" /* for calloc() */
#include <string.h> /* for memcpy()/memcmp() */
#include "FLAC/assert.h"
#include "protected/seekable_stream_decoder.h"
diff --git a/apps/codecs/libFLAC/seekable_stream_encoder.c b/apps/codecs/libFLAC/seekable_stream_encoder.c
index 18291a8052..ba4326bdc9 100644
--- a/apps/codecs/libFLAC/seekable_stream_encoder.c
+++ b/apps/codecs/libFLAC/seekable_stream_encoder.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for calloc() */
+#include "global.h" /* for calloc() */
#include <string.h> /* for memcpy() */
#include "FLAC/assert.h"
#include "protected/seekable_stream_encoder.h"
diff --git a/apps/codecs/libFLAC/stream_decoder.c b/apps/codecs/libFLAC/stream_decoder.c
index 16413140ce..cbf57a199e 100644
--- a/apps/codecs/libFLAC/stream_decoder.c
+++ b/apps/codecs/libFLAC/stream_decoder.c
@@ -30,7 +30,7 @@
*/
#include <stdio.h>
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for memset/memcpy() */
#include "FLAC/assert.h"
#include "protected/stream_decoder.h"
diff --git a/apps/codecs/libFLAC/stream_encoder.c b/apps/codecs/libFLAC/stream_encoder.c
index 33debfc06a..14f0815b8a 100644
--- a/apps/codecs/libFLAC/stream_encoder.c
+++ b/apps/codecs/libFLAC/stream_encoder.c
@@ -31,7 +31,7 @@
#include <limits.h>
#include <stdio.h>
-#include <stdlib.h> /* for malloc() */
+#include "global.h" /* for malloc() */
#include <string.h> /* for memcpy() */
#include "FLAC/assert.h"
#include "FLAC/stream_decoder.h"