Janne Hyvärinen wrote:
On 25.5.2013 10:54, Erik de Castro Lopo wrote:
Robert Kausch wrote:
I tried 1.3.0pre4 with ICL on Windows and found some issues.
The first two are quite straight forward:
- The ICL patch fixes a typo in bitmath.h and adds
FLAC__bitwriter_write_zeroes to the external declarations in bitwriter.c.
- The Ogg patch replaces the check for FLAC_API_SUPPORTS_OGG_FLAC in
stream_decoder.c with FLAC__HAS_OGG to fix compilation with Ogg support.
The _lseeki64 patch probably is a little more controversial.
Sorry, I've read through this thread and can't figure out what was
actually decided and which patch I should be looking at.
None.
I think the first two patches should actually go in.
- The second patch absolutely, because it fixes an all-platform
regression. (Actually, slightly modified perhaps; or even better, we
revert this part to how it was in 1.2.1. Attaching a patch to do that.)
- The first patch addresses two different issues. I've split it into
two patches (also attached). One of them fixes a mistyped variable
name that will obviously cause the Intel compiler to fail. Regarding
the other, well, it is certainly consistent with the other external
declarations, and if it helps the Intel compiler, why not?
Ulrich
>From 846e4d349062014eb6b960b0e16e80f63d8c691c Mon Sep 17 00:00:00 2001
From: Ulrich Klauer <ulr...@chirlu.de>
Date: Sat, 25 May 2013 14:14:08 +0200
Subject: [PATCH] Correctly initialize FLAC_API_SUPPORTS_OGG_FLAC
Commits a7e3705d051bafd1cae90f6605287cc1d9f2a18d and
a4c321e492748db0a7e38240699ba420ba88e01c, while trying to simplify how
the FLAC_API_SUPPORTS_OGG_FLAC global variable was initialized,
inadvertently caused it to be always set to false, whether Ogg support
was compiled in or not.
This commit reverts the relevant part to how it looked in the 1.2.1
release, which is verbose but correct.
The problem was found by Robert Kausch <robert.kau...@freac.org>.
---
src/libFLAC/stream_decoder.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
index 33be1e8..f4d2d39 100644
--- a/src/libFLAC/stream_decoder.c
+++ b/src/libFLAC/stream_decoder.c
@@ -55,11 +55,13 @@
/* technically this should be in an "export.c" but this is convenient enough */
-#ifdef FLAC_API_SUPPORTS_OGG_FLAC
-FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC = FLAC__HAS_OGG ;
+FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC =
+#if FLAC__HAS_OGG
+ 1
#else
-FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC = 0 ;
+ 0
#endif
+;
/***********************************************************************
--
1.7.10.4
>From 39ad5e721c715c1c2e9427ea128d7079912dc10d Mon Sep 17 00:00:00 2001
From: Robert Kausch <robert.kau...@freac.org>
Date: Sat, 25 May 2013 14:34:18 +0200
Subject: [PATCH 1/2] Fix mistyped variable name
---
src/libFLAC/include/private/bitmath.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libFLAC/include/private/bitmath.h b/src/libFLAC/include/private/bitmath.h
index 42ce639..e5c7695 100644
--- a/src/libFLAC/include/private/bitmath.h
+++ b/src/libFLAC/include/private/bitmath.h
@@ -74,7 +74,7 @@ static inline unsigned int FLAC__clz_uint32(FLAC__uint32 v)
{
/* Never used with input 0 */
#if defined(__INTEL_COMPILER)
- return _bit_scan_reverse(n) ^ 31U;
+ return _bit_scan_reverse(v) ^ 31U;
#elif defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
/* This will translate either to (bsr ^ 31U), clz , ctlz, cntlz, lzcnt depending on
* -march= setting or to a software rutine in exotic machines. */
--
1.7.10.4
>From 98fd66be667cc5557ba18fbf83fb8bbc016b0095 Mon Sep 17 00:00:00 2001
From: Robert Kausch <robert.kau...@freac.org>
Date: Sat, 25 May 2013 14:37:44 +0200
Subject: [PATCH 2/2] bitwriter.c : Add missing "extern" declaration
---
src/libFLAC/bitwriter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c
index 9b15aff..dd66e6d 100644
--- a/src/libFLAC/bitwriter.c
+++ b/src/libFLAC/bitwriter.c
@@ -857,6 +857,7 @@ FLAC__bool FLAC__bitwriter_zero_pad_to_byte_boundary(FLAC__BitWriter *bw)
* Unfortunately, the Microsoft VS compiler doesn't pick them up externally. To
* fix that we add extern declarations here.
*/
+extern FLAC__bool FLAC__bitwriter_write_zeroes(FLAC__BitWriter *bw, unsigned bits);
extern FLAC__bool FLAC__bitwriter_write_raw_int32(FLAC__BitWriter *bw, FLAC__int32 val, unsigned bits);
extern FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__uint64 val, unsigned bits);
extern FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter *bw, FLAC__uint32 val);
--
1.7.10.4
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev