mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-07 07:28:57 +02:00
hack for iostream on gcc2, gconfig enables bool operators but they are duplicated with char operators.
90 lines
4.1 KiB
Plaintext
90 lines
4.1 KiB
Plaintext
From c3238b4cd6aac6442534ba2f219312d9c45d5db9 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 26 Aug 2017 11:50:31 +0200
|
|
Subject: gcc2 fixes
|
|
|
|
|
|
diff --git a/include/FLAC++/decoder.h b/include/FLAC++/decoder.h
|
|
index fee6a3b..c1fbb13 100644
|
|
--- a/include/FLAC++/decoder.h
|
|
+++ b/include/FLAC++/decoder.h
|
|
@@ -225,11 +225,15 @@ namespace FLAC {
|
|
File();
|
|
virtual ~File();
|
|
|
|
+#if __GNUC__ > 2
|
|
using Stream::init;
|
|
+#endif
|
|
virtual ::FLAC__StreamDecoderInitStatus init(FILE *file); ///< See FLAC__stream_decoder_init_FILE()
|
|
virtual ::FLAC__StreamDecoderInitStatus init(const char *filename); ///< See FLAC__stream_decoder_init_file()
|
|
virtual ::FLAC__StreamDecoderInitStatus init(const std::string &filename); ///< See FLAC__stream_decoder_init_file()
|
|
+#if __GNUC__ > 2
|
|
using Stream::init_ogg;
|
|
+#endif
|
|
virtual ::FLAC__StreamDecoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_decoder_init_ogg_FILE()
|
|
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_decoder_init_ogg_file()
|
|
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_decoder_init_ogg_file()
|
|
diff --git a/include/FLAC++/encoder.h b/include/FLAC++/encoder.h
|
|
index acd5230..8ec88b5 100644
|
|
--- a/include/FLAC++/encoder.h
|
|
+++ b/include/FLAC++/encoder.h
|
|
@@ -237,11 +237,15 @@ namespace FLAC {
|
|
File();
|
|
virtual ~File();
|
|
|
|
+#if __GNUC__ > 2
|
|
using Stream::init;
|
|
+#endif
|
|
virtual ::FLAC__StreamEncoderInitStatus init(FILE *file); ///< See FLAC__stream_encoder_init_FILE()
|
|
virtual ::FLAC__StreamEncoderInitStatus init(const char *filename); ///< See FLAC__stream_encoder_init_file()
|
|
virtual ::FLAC__StreamEncoderInitStatus init(const std::string &filename); ///< See FLAC__stream_encoder_init_file()
|
|
+#if __GNUC__ > 2
|
|
using Stream::init_ogg;
|
|
+#endif
|
|
virtual ::FLAC__StreamEncoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_encoder_init_ogg_FILE()
|
|
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_encoder_init_ogg_file()
|
|
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_encoder_init_ogg_file()
|
|
diff --git a/src/libFLAC++/metadata.cpp b/src/libFLAC++/metadata.cpp
|
|
index c6dd937..a5af90e 100644
|
|
--- a/src/libFLAC++/metadata.cpp
|
|
+++ b/src/libFLAC++/metadata.cpp
|
|
@@ -827,7 +827,7 @@ namespace FLAC {
|
|
clear_field_name();
|
|
clear_field_value();
|
|
|
|
- const char *p = static_cast<const char *>(std::memchr(entry_.entry, '=', entry_.length));
|
|
+ const char *p = (const char *)(std::memchr(entry_.entry, '=', entry_.length));
|
|
|
|
if(0 == p)
|
|
p = reinterpret_cast<const char *>(entry_.entry) + entry_.length;
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From c32963d51b87ec4cbd2e17c5ca93eb5040973862 Mon Sep 17 00:00:00 2001
|
|
From: Robert Kausch <robert.kausch@freac.org>
|
|
Date: Wed, 12 Oct 2022 15:07:52 +0000
|
|
Subject: gcc2 fixes
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 8ec6e26..64c7b02 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -83,11 +83,11 @@ if(NOT WIN32)
|
|
endif()
|
|
|
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
|
- set(CMAKE_C_FLAGS "-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline ${CMAKE_C_FLAGS}")
|
|
+ set(CMAKE_C_FLAGS "-Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline ${CMAKE_C_FLAGS}")
|
|
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${CMAKE_C_FLAGS_RELEASE}")
|
|
endif()
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef ${CMAKE_CXX_FLAGS}")
|
|
+ set(CMAKE_CXX_FLAGS "-Wall -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef ${CMAKE_CXX_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${CMAKE_CXX_FLAGS_RELEASE}")
|
|
endif()
|
|
if(MSVC)
|
|
--
|
|
2.37.3
|