1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix multiple compile errors on older gcc versions

This commit is contained in:
hogliux 2016-05-26 11:50:04 +01:00
parent 8c99b63a5d
commit cf39ad4b02
15 changed files with 104 additions and 66 deletions

View file

@ -41,11 +41,14 @@
* before #including this file, otherwise SIZE_MAX might not be defined
*/
#include <limits.h> /* for SIZE_MAX */
#if HAVE_STDINT_H
#include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
#endif
#include <stdlib.h> /* for size_t, malloc(), etc */
// JUCE: removed as JUCE already includes standard headers and including
// these in FlacNamespace will cause problems
//#include <limits.h> /* for SIZE_MAX */
//#if HAVE_STDINT_H
//#include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
//#endif
//#include <stdlib.h> /* for size_t, malloc(), etc */
#include "compat.h"
#ifndef SIZE_MAX

View file

@ -35,7 +35,10 @@
/* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */
#ifdef DEBUG
#include <assert.h>
// JUCE: removed as JUCE already includes standard headers and including
// these in FlacNamespace will cause problems
//#include <assert.h>
#define FLAC__ASSERT(x) assert(x)
#define FLAC__ASSERT_DECLARATION(x) x
#else

View file

@ -34,7 +34,10 @@
#define FLAC__CALLBACK_H
#include "ordinals.h"
#include <stdlib.h> /* for size_t */
// JUCE: removed as JUCE already includes this and including stdlib
// in FlacNamespace will cause problems
//#include <stdlib.h>
/** \file include/FLAC/callback.h
*

View file

@ -39,15 +39,7 @@
#ifndef FLAC__SHARE__COMPAT_H
#define FLAC__SHARE__COMPAT_H
#if defined _WIN32 && !defined __CYGWIN__
/* where MSVC puts unlink() */
# include <io.h>
#else
# include <unistd.h>
#endif
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
#include <sys/types.h> /* for off_t */
#define FLAC__off_t __int64 /* use this instead of off_t to fix the 2 GB limit */
#if !defined __MINGW32__
#define fseeko _fseeki64
@ -62,11 +54,6 @@
#define FLAC__off_t off_t
#endif
#if HAVE_INTTYPES_H
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#endif
#if defined(_MSC_VER)
#define strtoll _strtoi64
#define strtoull _strtoui64
@ -95,33 +82,13 @@
#define FLAC__STRNCASECMP strncasecmp
#endif
#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__
#include <io.h> /* for _setmode(), chmod() */
#include <fcntl.h> /* for _O_BINARY */
#else
#include <unistd.h> /* for chown(), unlink() */
#endif
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
#if defined __BORLANDC__
#include <utime.h> /* for utime() */
#else
#include <sys/utime.h> /* for utime() */
#endif
#else
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
#include <utime.h> /* for utime() */
#endif
#if defined _MSC_VER
# if _MSC_VER >= 1600
/* Visual Studio 2010 has decent C99 support */
# include <stdint.h>
# define PRIu64 "llu"
# define PRId64 "lld"
# define PRIx64 "llx"
# else
# include <limits.h>
# ifndef UINT32_MAX
# define UINT32_MAX _UI32_MAX
# endif

View file

@ -51,7 +51,9 @@ static inline unsigned short __builtin_bswap16(unsigned short a)
#elif defined HAVE_BYTESWAP_H /* Linux */
#include <byteswap.h>
// JUCE: removed as JUCE already includes standard headers and including
// these in FlacNamespace will cause problems
//#include <byteswap.h>
#define ENDSWAP_16(x) (bswap_16 (x))
#define ENDSWAP_32(x) (bswap_32 (x))

View file

@ -33,7 +33,6 @@
#ifndef FLAC__METADATA_H
#define FLAC__METADATA_H
#include <sys/types.h> /* for off_t */
#include "export.h"
#include "callback.h"
#include "format.h"

View file

@ -33,7 +33,6 @@
#ifndef FLAC__STREAM_DECODER_H
#define FLAC__STREAM_DECODER_H
#include <stdio.h> /* for FILE */
#include "export.h"
#include "format.h"

View file

@ -33,7 +33,6 @@
#ifndef FLAC__STREAM_ENCODER_H
#define FLAC__STREAM_ENCODER_H
#include <stdio.h> /* for FILE */
#include "export.h"
#include "format.h"
#include "stream_decoder.h"

View file

@ -38,11 +38,6 @@
extern "C" {
#endif
#include <stdio.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <windows.h>
int get_utf8_argv(int *argc, char ***argv);
int printf_utf8(const char *format, ...);