Commit 048d2ad1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Fix flac compilation for both win32 and win64

parent 067c379f
...@@ -853,7 +853,7 @@ flac-$(FLAC_VERSION).tar.gz: ...@@ -853,7 +853,7 @@ flac-$(FLAC_VERSION).tar.gz:
flac: flac-$(FLAC_VERSION).tar.gz flac: flac-$(FLAC_VERSION).tar.gz
$(EXTRACT_GZ) $(EXTRACT_GZ)
ifdef HAVE_WIN32 ifdef HAVE_WIN32
( cd $@; patch -p1 < ../Patches/flac-win32.patch ) patch -p0 < Patches/flac-win32.patch
endif endif
FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs
......
From c70feed35606875b5e136c271e80b153c3d87889 Mon Sep 17 00:00:00 2001 diff -ruN flac/include/share/alloc.h flac.new/include/share/alloc.h
From: jonY <jon_y@users.sourceforge.net> --- flac/include/share/alloc.h 2007-09-12 07:32:21.000000000 +0200
Date: Wed, 12 Aug 2009 16:03:51 +0800 +++ flac.new/include/share/alloc.h 2009-08-23 12:33:30.000000000 +0200
Subject: [PATCH] fix some _MSC_VER_ misuse @@ -28,7 +28,7 @@
*/
--- #include <limits.h> /* for SIZE_MAX */
src/flac/analyze.c | 2 +- -#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
src/libFLAC/lpc.c | 12 ++++++------ +#if !defined _MSC_VER && !defined __EMX__
src/metaflac/operations.c | 10 +++++----- #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
src/metaflac/operations_shorthand_cuesheet.c | 4 ++-- #endif
src/metaflac/operations_shorthand_streaminfo.c | 2 +- #include <stdlib.h> /* for size_t, malloc(), etc */
src/share/grabbag/cuesheet.c | 6 +++--- diff -ruN flac/src/flac/analyze.c flac.new/src/flac/analyze.c
src/test_libFLAC++/encoders.cpp | 2 +- --- flac/src/flac/analyze.c 2007-05-25 21:34:48.000000000 +0200
src/test_libFLAC/encoders.c | 2 +- +++ flac.new/src/flac/analyze.c 2009-08-23 12:33:09.000000000 +0200
src/test_libFLAC/metadata_object.c | 8 ++++---- @@ -66,7 +66,7 @@
src/test_libs_common/metadata_utils.c | 12 ++++++------
src/test_seeking/main.c | 8 ++++----
11 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/flac/analyze.c b/src/flac/analyze.c
index 47a5e76..578bbd8 100644
--- a/src/flac/analyze.c
+++ b/src/flac/analyze.c
@@ -66,7 +66,7 @@ void flac__analyze_frame(const FLAC__Frame *frame, unsigned frame_number, FLAC__
unsigned i, channel, partitions; unsigned i, channel, partitions;
/* do the human-readable part first */ /* do the human-readable part first */
...@@ -30,11 +22,10 @@ index 47a5e76..578bbd8 100644 ...@@ -30,11 +22,10 @@ index 47a5e76..578bbd8 100644
fprintf(fout, "frame=%u\toffset=%I64u\tbits=%u\tblocksize=%u\tsample_rate=%u\tchannels=%u\tchannel_assignment=%s\n", frame_number, frame_offset, frame_bytes*8, frame->header.blocksize, frame->header.sample_rate, channels, FLAC__ChannelAssignmentString[frame->header.channel_assignment]); fprintf(fout, "frame=%u\toffset=%I64u\tbits=%u\tblocksize=%u\tsample_rate=%u\tchannels=%u\tchannel_assignment=%s\n", frame_number, frame_offset, frame_bytes*8, frame->header.blocksize, frame->header.sample_rate, channels, FLAC__ChannelAssignmentString[frame->header.channel_assignment]);
#else #else
fprintf(fout, "frame=%u\toffset=%llu\tbits=%u\tblocksize=%u\tsample_rate=%u\tchannels=%u\tchannel_assignment=%s\n", frame_number, (unsigned long long)frame_offset, frame_bytes*8, frame->header.blocksize, frame->header.sample_rate, channels, FLAC__ChannelAssignmentString[frame->header.channel_assignment]); fprintf(fout, "frame=%u\toffset=%llu\tbits=%u\tblocksize=%u\tsample_rate=%u\tchannels=%u\tchannel_assignment=%s\n", frame_number, (unsigned long long)frame_offset, frame_bytes*8, frame->header.blocksize, frame->header.sample_rate, channels, FLAC__ChannelAssignmentString[frame->header.channel_assignment]);
diff --git a/src/libFLAC/lpc.c b/src/libFLAC/lpc.c diff -ruN flac/src/libFLAC/lpc.c flac.new/src/libFLAC/lpc.c
index 7806348..cf81400 100644 --- flac/src/libFLAC/lpc.c 2007-09-04 20:15:03.000000000 +0200
--- a/src/libFLAC/lpc.c +++ flac.new/src/libFLAC/lpc.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/libFLAC/lpc.c @@ -285,7 +285,7 @@
@@ -285,7 +285,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 *data, u
for(j = 0; j < order; j++) { for(j = 0; j < order; j++) {
sum += qlp_coeff[j] * (*(--history)); sum += qlp_coeff[j] * (*(--history));
sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history); sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history);
...@@ -43,7 +34,7 @@ index 7806348..cf81400 100644 ...@@ -43,7 +34,7 @@ index 7806348..cf81400 100644
if(sumo > 2147483647I64 || sumo < -2147483648I64) if(sumo > 2147483647I64 || sumo < -2147483648I64)
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%I64d\n",i,j,qlp_coeff[j],*history,sumo); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%I64d\n",i,j,qlp_coeff[j],*history,sumo);
#else #else
@@ -549,7 +549,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 *da @@ -549,7 +549,7 @@
for(j = 0; j < order; j++) for(j = 0; j < order; j++)
sum += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*(--history)); sum += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*(--history));
if(FLAC__bitmath_silog2_wide(sum >> lp_quantization) > 32) { if(FLAC__bitmath_silog2_wide(sum >> lp_quantization) > 32) {
...@@ -52,7 +43,7 @@ index 7806348..cf81400 100644 ...@@ -52,7 +43,7 @@ index 7806348..cf81400 100644
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, sum=%I64d\n", i, sum >> lp_quantization); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, sum=%I64d\n", i, sum >> lp_quantization);
#else #else
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, sum=%lld\n", i, (long long)(sum >> lp_quantization)); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, sum=%lld\n", i, (long long)(sum >> lp_quantization));
@@ -557,7 +557,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 *da @@ -557,7 +557,7 @@
break; break;
} }
if(FLAC__bitmath_silog2_wide((FLAC__int64)(*data) - (sum >> lp_quantization)) > 32) { if(FLAC__bitmath_silog2_wide((FLAC__int64)(*data) - (sum >> lp_quantization)) > 32) {
...@@ -61,7 +52,7 @@ index 7806348..cf81400 100644 ...@@ -61,7 +52,7 @@ index 7806348..cf81400 100644
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, data=%d, sum=%I64d, residual=%I64d\n", i, *data, sum >> lp_quantization, (FLAC__int64)(*data) - (sum >> lp_quantization)); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, data=%d, sum=%I64d, residual=%I64d\n", i, *data, sum >> lp_quantization, (FLAC__int64)(*data) - (sum >> lp_quantization));
#else #else
fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, data=%d, sum=%lld, residual=%lld\n", i, *data, (long long)(sum >> lp_quantization), (long long)((FLAC__int64)(*data) - (sum >> lp_quantization))); fprintf(stderr,"FLAC__lpc_compute_residual_from_qlp_coefficients_wide: OVERFLOW, i=%u, data=%d, sum=%lld, residual=%lld\n", i, *data, (long long)(sum >> lp_quantization), (long long)((FLAC__int64)(*data) - (sum >> lp_quantization)));
@@ -815,7 +815,7 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c @@ -815,7 +815,7 @@
for(j = 0; j < order; j++) { for(j = 0; j < order; j++) {
sum += qlp_coeff[j] * (*(--history)); sum += qlp_coeff[j] * (*(--history));
sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history); sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history);
...@@ -70,7 +61,7 @@ index 7806348..cf81400 100644 ...@@ -70,7 +61,7 @@ index 7806348..cf81400 100644
if(sumo > 2147483647I64 || sumo < -2147483648I64) if(sumo > 2147483647I64 || sumo < -2147483648I64)
fprintf(stderr,"FLAC__lpc_restore_signal: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%I64d\n",i,j,qlp_coeff[j],*history,sumo); fprintf(stderr,"FLAC__lpc_restore_signal: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%I64d\n",i,j,qlp_coeff[j],*history,sumo);
#else #else
@@ -1079,7 +1079,7 @@ void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_l @@ -1079,7 +1079,7 @@
for(j = 0; j < order; j++) for(j = 0; j < order; j++)
sum += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*(--history)); sum += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*(--history));
if(FLAC__bitmath_silog2_wide(sum >> lp_quantization) > 32) { if(FLAC__bitmath_silog2_wide(sum >> lp_quantization) > 32) {
...@@ -79,7 +70,7 @@ index 7806348..cf81400 100644 ...@@ -79,7 +70,7 @@ index 7806348..cf81400 100644
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%I64d\n", i, sum >> lp_quantization); fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%I64d\n", i, sum >> lp_quantization);
#else #else
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%lld\n", i, (long long)(sum >> lp_quantization)); fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%lld\n", i, (long long)(sum >> lp_quantization));
@@ -1087,7 +1087,7 @@ void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_l @@ -1087,7 +1087,7 @@
break; break;
} }
if(FLAC__bitmath_silog2_wide((FLAC__int64)(*r) + (sum >> lp_quantization)) > 32) { if(FLAC__bitmath_silog2_wide((FLAC__int64)(*r) + (sum >> lp_quantization)) > 32) {
...@@ -88,11 +79,10 @@ index 7806348..cf81400 100644 ...@@ -88,11 +79,10 @@ index 7806348..cf81400 100644
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%I64d, data=%I64d\n", i, *r, sum >> lp_quantization, (FLAC__int64)(*r) + (sum >> lp_quantization)); fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%I64d, data=%I64d\n", i, *r, sum >> lp_quantization, (FLAC__int64)(*r) + (sum >> lp_quantization));
#else #else
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%lld, data=%lld\n", i, *r, (long long)(sum >> lp_quantization), (long long)((FLAC__int64)(*r) + (sum >> lp_quantization))); fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%lld, data=%lld\n", i, *r, (long long)(sum >> lp_quantization), (long long)((FLAC__int64)(*r) + (sum >> lp_quantization)));
diff --git a/src/metaflac/operations.c b/src/metaflac/operations.c diff -ruN flac/src/metaflac/operations.c flac.new/src/metaflac/operations.c
index 54774bf..9a5bcb7 100644 --- flac/src/metaflac/operations.c 2007-09-11 06:23:29.000000000 +0200
--- a/src/metaflac/operations.c +++ flac.new/src/metaflac/operations.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/metaflac/operations.c @@ -565,7 +565,7 @@
@@ -565,7 +565,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned
PPR; printf(" sample_rate: %u Hz\n", block->data.stream_info.sample_rate); PPR; printf(" sample_rate: %u Hz\n", block->data.stream_info.sample_rate);
PPR; printf(" channels: %u\n", block->data.stream_info.channels); PPR; printf(" channels: %u\n", block->data.stream_info.channels);
PPR; printf(" bits-per-sample: %u\n", block->data.stream_info.bits_per_sample); PPR; printf(" bits-per-sample: %u\n", block->data.stream_info.bits_per_sample);
...@@ -101,7 +91,7 @@ index 54774bf..9a5bcb7 100644 ...@@ -101,7 +91,7 @@ index 54774bf..9a5bcb7 100644
PPR; printf(" total samples: %I64u\n", block->data.stream_info.total_samples); PPR; printf(" total samples: %I64u\n", block->data.stream_info.total_samples);
#else #else
PPR; printf(" total samples: %llu\n", (unsigned long long)block->data.stream_info.total_samples); PPR; printf(" total samples: %llu\n", (unsigned long long)block->data.stream_info.total_samples);
@@ -596,7 +596,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned @@ -596,7 +596,7 @@
PPR; printf(" seek points: %u\n", block->data.seek_table.num_points); PPR; printf(" seek points: %u\n", block->data.seek_table.num_points);
for(i = 0; i < block->data.seek_table.num_points; i++) { for(i = 0; i < block->data.seek_table.num_points; i++) {
if(block->data.seek_table.points[i].sample_number != FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER) { if(block->data.seek_table.points[i].sample_number != FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER) {
...@@ -110,7 +100,7 @@ index 54774bf..9a5bcb7 100644 ...@@ -110,7 +100,7 @@ index 54774bf..9a5bcb7 100644
PPR; printf(" point %u: sample_number=%I64u, stream_offset=%I64u, frame_samples=%u\n", i, block->data.seek_table.points[i].sample_number, block->data.seek_table.points[i].stream_offset, block->data.seek_table.points[i].frame_samples); PPR; printf(" point %u: sample_number=%I64u, stream_offset=%I64u, frame_samples=%u\n", i, block->data.seek_table.points[i].sample_number, block->data.seek_table.points[i].stream_offset, block->data.seek_table.points[i].frame_samples);
#else #else
PPR; printf(" point %u: sample_number=%llu, stream_offset=%llu, frame_samples=%u\n", i, (unsigned long long)block->data.seek_table.points[i].sample_number, (unsigned long long)block->data.seek_table.points[i].stream_offset, block->data.seek_table.points[i].frame_samples); PPR; printf(" point %u: sample_number=%llu, stream_offset=%llu, frame_samples=%u\n", i, (unsigned long long)block->data.seek_table.points[i].sample_number, (unsigned long long)block->data.seek_table.points[i].stream_offset, block->data.seek_table.points[i].frame_samples);
@@ -618,7 +618,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned @@ -618,7 +618,7 @@
break; break;
case FLAC__METADATA_TYPE_CUESHEET: case FLAC__METADATA_TYPE_CUESHEET:
PPR; printf(" media catalog number: %s\n", block->data.cue_sheet.media_catalog_number); PPR; printf(" media catalog number: %s\n", block->data.cue_sheet.media_catalog_number);
...@@ -119,7 +109,7 @@ index 54774bf..9a5bcb7 100644 ...@@ -119,7 +109,7 @@ index 54774bf..9a5bcb7 100644
PPR; printf(" lead-in: %I64u\n", block->data.cue_sheet.lead_in); PPR; printf(" lead-in: %I64u\n", block->data.cue_sheet.lead_in);
#else #else
PPR; printf(" lead-in: %llu\n", (unsigned long long)block->data.cue_sheet.lead_in); PPR; printf(" lead-in: %llu\n", (unsigned long long)block->data.cue_sheet.lead_in);
@@ -630,7 +630,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned @@ -630,7 +630,7 @@
const FLAC__bool is_last = (i == block->data.cue_sheet.num_tracks-1); const FLAC__bool is_last = (i == block->data.cue_sheet.num_tracks-1);
const FLAC__bool is_leadout = is_last && track->num_indices == 0; const FLAC__bool is_leadout = is_last && track->num_indices == 0;
PPR; printf(" track[%u]\n", i); PPR; printf(" track[%u]\n", i);
...@@ -128,7 +118,7 @@ index 54774bf..9a5bcb7 100644 ...@@ -128,7 +118,7 @@ index 54774bf..9a5bcb7 100644
PPR; printf(" offset: %I64u\n", track->offset); PPR; printf(" offset: %I64u\n", track->offset);
#else #else
PPR; printf(" offset: %llu\n", (unsigned long long)track->offset); PPR; printf(" offset: %llu\n", (unsigned long long)track->offset);
@@ -649,7 +649,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned @@ -649,7 +649,7 @@
for(j = 0; j < track->num_indices; j++) { for(j = 0; j < track->num_indices; j++) {
const FLAC__StreamMetadata_CueSheet_Index *index = track->indices+j; const FLAC__StreamMetadata_CueSheet_Index *index = track->indices+j;
PPR; printf(" index[%u]\n", j); PPR; printf(" index[%u]\n", j);
...@@ -137,11 +127,10 @@ index 54774bf..9a5bcb7 100644 ...@@ -137,11 +127,10 @@ index 54774bf..9a5bcb7 100644
PPR; printf(" offset: %I64u\n", index->offset); PPR; printf(" offset: %I64u\n", index->offset);
#else #else
PPR; printf(" offset: %llu\n", (unsigned long long)index->offset); PPR; printf(" offset: %llu\n", (unsigned long long)index->offset);
diff --git a/src/metaflac/operations_shorthand_cuesheet.c b/src/metaflac/operations_shorthand_cuesheet.c diff -ruN flac/src/metaflac/operations_shorthand_cuesheet.c flac.new/src/metaflac/operations_shorthand_cuesheet.c
index 14912c1..580ae62 100644 --- flac/src/metaflac/operations_shorthand_cuesheet.c 2007-07-25 04:36:59.000000000 +0200
--- a/src/metaflac/operations_shorthand_cuesheet.c +++ flac.new/src/metaflac/operations_shorthand_cuesheet.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/metaflac/operations_shorthand_cuesheet.c @@ -160,7 +160,7 @@
@@ -160,7 +160,7 @@ FLAC__bool import_cs_from(const char *filename, FLAC__StreamMetadata **cuesheet,
for(track = 0; track < cs->num_tracks; track++) { for(track = 0; track < cs->num_tracks; track++) {
const FLAC__StreamMetadata_CueSheet_Track *tr = cs->tracks+track; const FLAC__StreamMetadata_CueSheet_Track *tr = cs->tracks+track;
for(index = 0; index < tr->num_indices; index++) { for(index = 0; index < tr->num_indices; index++) {
...@@ -150,7 +139,7 @@ index 14912c1..580ae62 100644 ...@@ -150,7 +139,7 @@ index 14912c1..580ae62 100644
sprintf(spec, "%I64u;", tr->offset + tr->indices[index].offset); sprintf(spec, "%I64u;", tr->offset + tr->indices[index].offset);
#else #else
sprintf(spec, "%llu;", (unsigned long long)(tr->offset + tr->indices[index].offset)); sprintf(spec, "%llu;", (unsigned long long)(tr->offset + tr->indices[index].offset));
@@ -200,7 +200,7 @@ FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cueshe @@ -200,7 +200,7 @@
return false; return false;
} }
...@@ -159,11 +148,10 @@ index 14912c1..580ae62 100644 ...@@ -159,11 +148,10 @@ index 14912c1..580ae62 100644
_snprintf(ref, reflen, "\"%s\" FLAC", filename); _snprintf(ref, reflen, "\"%s\" FLAC", filename);
#else #else
snprintf(ref, reflen, "\"%s\" FLAC", filename); snprintf(ref, reflen, "\"%s\" FLAC", filename);
diff --git a/src/metaflac/operations_shorthand_streaminfo.c b/src/metaflac/operations_shorthand_streaminfo.c diff -ruN flac/src/metaflac/operations_shorthand_streaminfo.c flac.new/src/metaflac/operations_shorthand_streaminfo.c
index b4593f5..754655e 100644 --- flac/src/metaflac/operations_shorthand_streaminfo.c 2007-07-25 04:36:59.000000000 +0200
--- a/src/metaflac/operations_shorthand_streaminfo.c +++ flac.new/src/metaflac/operations_shorthand_streaminfo.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/metaflac/operations_shorthand_streaminfo.c @@ -75,7 +75,7 @@
@@ -75,7 +75,7 @@ FLAC__bool do_shorthand_operation__streaminfo(const char *filename, FLAC__bool p
printf("%u\n", block->data.stream_info.bits_per_sample); printf("%u\n", block->data.stream_info.bits_per_sample);
break; break;
case OP__SHOW_TOTAL_SAMPLES: case OP__SHOW_TOTAL_SAMPLES:
...@@ -172,11 +160,10 @@ index b4593f5..754655e 100644 ...@@ -172,11 +160,10 @@ index b4593f5..754655e 100644
printf("%I64u\n", block->data.stream_info.total_samples); printf("%I64u\n", block->data.stream_info.total_samples);
#else #else
printf("%llu\n", (unsigned long long)block->data.stream_info.total_samples); printf("%llu\n", (unsigned long long)block->data.stream_info.total_samples);
diff --git a/src/share/grabbag/cuesheet.c b/src/share/grabbag/cuesheet.c diff -ruN flac/src/share/grabbag/cuesheet.c flac.new/src/share/grabbag/cuesheet.c
index 03f7cda..3fc9555 100644 --- flac/src/share/grabbag/cuesheet.c 2007-07-31 00:29:24.000000000 +0200
--- a/src/share/grabbag/cuesheet.c +++ flac.new/src/share/grabbag/cuesheet.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/share/grabbag/cuesheet.c @@ -200,7 +200,7 @@
@@ -200,7 +200,7 @@ static char *local__get_field_(char **s, FLAC__bool allow_quotes)
static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__StreamMetadata *cuesheet, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset) static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__StreamMetadata *cuesheet, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset)
{ {
...@@ -185,7 +172,7 @@ index 03f7cda..3fc9555 100644 ...@@ -185,7 +172,7 @@ index 03f7cda..3fc9555 100644
#define FLAC__STRCASECMP stricmp #define FLAC__STRCASECMP stricmp
#else #else
#define FLAC__STRCASECMP strcasecmp #define FLAC__STRCASECMP strcasecmp
@@ -593,7 +593,7 @@ void grabbag__cuesheet_emit(FILE *file, const FLAC__StreamMetadata *cuesheet, co @@ -593,7 +593,7 @@
fprintf(file, "%02u:%02u:%02u\n", m, s, f); fprintf(file, "%02u:%02u:%02u\n", m, s, f);
} }
else else
...@@ -194,7 +181,7 @@ index 03f7cda..3fc9555 100644 ...@@ -194,7 +181,7 @@ index 03f7cda..3fc9555 100644
fprintf(file, "%I64u\n", track->offset + index->offset); fprintf(file, "%I64u\n", track->offset + index->offset);
#else #else
fprintf(file, "%llu\n", (unsigned long long)(track->offset + index->offset)); fprintf(file, "%llu\n", (unsigned long long)(track->offset + index->offset));
@@ -601,7 +601,7 @@ void grabbag__cuesheet_emit(FILE *file, const FLAC__StreamMetadata *cuesheet, co @@ -601,7 +601,7 @@
} }
} }
...@@ -203,24 +190,10 @@ index 03f7cda..3fc9555 100644 ...@@ -203,24 +190,10 @@ index 03f7cda..3fc9555 100644
fprintf(file, "REM FLAC__lead-in %I64u\n", cs->lead_in); fprintf(file, "REM FLAC__lead-in %I64u\n", cs->lead_in);
fprintf(file, "REM FLAC__lead-out %u %I64u\n", (unsigned)cs->tracks[track_num].number, cs->tracks[track_num].offset); fprintf(file, "REM FLAC__lead-out %u %I64u\n", (unsigned)cs->tracks[track_num].number, cs->tracks[track_num].offset);
#else #else
diff --git a/src/test_libFLAC++/encoders.cpp b/src/test_libFLAC++/encoders.cpp diff -ruN flac/src/test_libFLAC/encoders.c flac.new/src/test_libFLAC/encoders.c
index 6b1ab69..cde7634 100644 --- flac/src/test_libFLAC/encoders.c 2007-08-01 00:39:39.000000000 +0200
--- a/src/test_libFLAC++/encoders.cpp +++ flac.new/src/test_libFLAC/encoders.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/test_libFLAC++/encoders.cpp @@ -449,7 +449,7 @@
@@ -478,7 +478,7 @@ static bool test_stream_encoder(Layer layer, bool is_ogg)
printf("testing get_total_samples_estimate()... ");
if(encoder->get_total_samples_estimate() != streaminfo_.data.stream_info.total_samples) {
-#ifdef _MSC_VER
+#ifdef __MSVCRT__
printf("FAILED, expected %I64u, got %I64u\n", streaminfo_.data.stream_info.total_samples, encoder->get_total_samples_estimate());
#else
printf("FAILED, expected %llu, got %llu\n", (unsigned long long)streaminfo_.data.stream_info.total_samples, (unsigned long long)encoder->get_total_samples_estimate());
diff --git a/src/test_libFLAC/encoders.c b/src/test_libFLAC/encoders.c
index 5927cb8..728dd18 100644
--- a/src/test_libFLAC/encoders.c
+++ b/src/test_libFLAC/encoders.c
@@ -449,7 +449,7 @@ static FLAC__bool test_stream_encoder(Layer layer, FLAC__bool is_ogg)
printf("testing FLAC__stream_encoder_get_total_samples_estimate()... "); printf("testing FLAC__stream_encoder_get_total_samples_estimate()... ");
if(FLAC__stream_encoder_get_total_samples_estimate(encoder) != streaminfo_.data.stream_info.total_samples) { if(FLAC__stream_encoder_get_total_samples_estimate(encoder) != streaminfo_.data.stream_info.total_samples) {
...@@ -229,11 +202,10 @@ index 5927cb8..728dd18 100644 ...@@ -229,11 +202,10 @@ index 5927cb8..728dd18 100644
printf("FAILED, expected %I64u, got %I64u\n", streaminfo_.data.stream_info.total_samples, FLAC__stream_encoder_get_total_samples_estimate(encoder)); printf("FAILED, expected %I64u, got %I64u\n", streaminfo_.data.stream_info.total_samples, FLAC__stream_encoder_get_total_samples_estimate(encoder));
#else #else
printf("FAILED, expected %llu, got %llu\n", (unsigned long long)streaminfo_.data.stream_info.total_samples, (unsigned long long)FLAC__stream_encoder_get_total_samples_estimate(encoder)); printf("FAILED, expected %llu, got %llu\n", (unsigned long long)streaminfo_.data.stream_info.total_samples, (unsigned long long)FLAC__stream_encoder_get_total_samples_estimate(encoder));
diff --git a/src/test_libFLAC/metadata_object.c b/src/test_libFLAC/metadata_object.c diff -ruN flac/src/test_libFLAC/metadata_object.c flac.new/src/test_libFLAC/metadata_object.c
index 617248f..4a0ab56 100644 --- flac/src/test_libFLAC/metadata_object.c 2007-09-11 06:48:59.000000000 +0200
--- a/src/test_libFLAC/metadata_object.c +++ flac.new/src/test_libFLAC/metadata_object.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/test_libFLAC/metadata_object.c @@ -47,7 +47,7 @@
@@ -47,7 +47,7 @@ static FLAC__bool compare_track_(const FLAC__StreamMetadata_CueSheet_Track *from
unsigned i; unsigned i;
if(from->offset != to->offset) { if(from->offset != to->offset) {
...@@ -242,7 +214,7 @@ index 617248f..4a0ab56 100644 ...@@ -242,7 +214,7 @@ index 617248f..4a0ab56 100644
printf("FAILED, track offset mismatch, expected %I64u, got %I64u\n", to->offset, from->offset); printf("FAILED, track offset mismatch, expected %I64u, got %I64u\n", to->offset, from->offset);
#else #else
printf("FAILED, track offset mismatch, expected %llu, got %llu\n", (unsigned long long)to->offset, (unsigned long long)from->offset); printf("FAILED, track offset mismatch, expected %llu, got %llu\n", (unsigned long long)to->offset, (unsigned long long)from->offset);
@@ -83,7 +83,7 @@ static FLAC__bool compare_track_(const FLAC__StreamMetadata_CueSheet_Track *from @@ -83,7 +83,7 @@
else { else {
for(i = 0; i < to->num_indices; i++) { for(i = 0; i < to->num_indices; i++) {
if(from->indices[i].offset != to->indices[i].offset) { if(from->indices[i].offset != to->indices[i].offset) {
...@@ -251,7 +223,7 @@ index 617248f..4a0ab56 100644 ...@@ -251,7 +223,7 @@ index 617248f..4a0ab56 100644
printf("FAILED, track indices[%u].offset mismatch, expected %I64u, got %I64u\n", i, to->indices[i].offset, from->indices[i].offset); printf("FAILED, track indices[%u].offset mismatch, expected %I64u, got %I64u\n", i, to->indices[i].offset, from->indices[i].offset);
#else #else
printf("FAILED, track indices[%u].offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to->indices[i].offset, (unsigned long long)from->indices[i].offset); printf("FAILED, track indices[%u].offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to->indices[i].offset, (unsigned long long)from->indices[i].offset);
@@ -109,7 +109,7 @@ static FLAC__bool compare_seekpoint_array_(const FLAC__StreamMetadata_SeekPoint @@ -109,7 +109,7 @@
for(i = 0; i < n; i++) { for(i = 0; i < n; i++) {
if(from[i].sample_number != to[i].sample_number) { if(from[i].sample_number != to[i].sample_number) {
...@@ -260,7 +232,7 @@ index 617248f..4a0ab56 100644 ...@@ -260,7 +232,7 @@ index 617248f..4a0ab56 100644
printf("FAILED, point[%u].sample_number mismatch, expected %I64u, got %I64u\n", i, to[i].sample_number, from[i].sample_number); printf("FAILED, point[%u].sample_number mismatch, expected %I64u, got %I64u\n", i, to[i].sample_number, from[i].sample_number);
#else #else
printf("FAILED, point[%u].sample_number mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].sample_number, (unsigned long long)from[i].sample_number); printf("FAILED, point[%u].sample_number mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].sample_number, (unsigned long long)from[i].sample_number);
@@ -117,7 +117,7 @@ static FLAC__bool compare_seekpoint_array_(const FLAC__StreamMetadata_SeekPoint @@ -117,7 +117,7 @@
return false; return false;
} }
if(from[i].stream_offset != to[i].stream_offset) { if(from[i].stream_offset != to[i].stream_offset) {
...@@ -269,11 +241,22 @@ index 617248f..4a0ab56 100644 ...@@ -269,11 +241,22 @@ index 617248f..4a0ab56 100644
printf("FAILED, point[%u].stream_offset mismatch, expected %I64u, got %I64u\n", i, to[i].stream_offset, from[i].stream_offset); printf("FAILED, point[%u].stream_offset mismatch, expected %I64u, got %I64u\n", i, to[i].stream_offset, from[i].stream_offset);
#else #else
printf("FAILED, point[%u].stream_offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].stream_offset, (unsigned long long)from[i].stream_offset); printf("FAILED, point[%u].stream_offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].stream_offset, (unsigned long long)from[i].stream_offset);
diff --git a/src/test_libs_common/metadata_utils.c b/src/test_libs_common/metadata_utils.c diff -ruN flac/src/test_libFLAC++/encoders.cpp flac.new/src/test_libFLAC++/encoders.cpp
index fe192e7..75ad60f 100644 --- flac/src/test_libFLAC++/encoders.cpp 2007-08-01 00:41:55.000000000 +0200
--- a/src/test_libs_common/metadata_utils.c +++ flac.new/src/test_libFLAC++/encoders.cpp 2009-08-23 12:33:09.000000000 +0200
+++ b/src/test_libs_common/metadata_utils.c @@ -478,7 +478,7 @@
@@ -61,7 +61,7 @@ FLAC__bool mutils__compare_block_data_streaminfo(const FLAC__StreamMetadata_Stre
printf("testing get_total_samples_estimate()... ");
if(encoder->get_total_samples_estimate() != streaminfo_.data.stream_info.total_samples) {
-#ifdef _MSC_VER
+#ifdef __MSVCRT__
printf("FAILED, expected %I64u, got %I64u\n", streaminfo_.data.stream_info.total_samples, encoder->get_total_samples_estimate());
#else
printf("FAILED, expected %llu, got %llu\n", (unsigned long long)streaminfo_.data.stream_info.total_samples, (unsigned long long)encoder->get_total_samples_estimate());
diff -ruN flac/src/test_libs_common/metadata_utils.c flac.new/src/test_libs_common/metadata_utils.c
--- flac/src/test_libs_common/metadata_utils.c 2007-02-02 07:27:17.000000000 +0100
+++ flac.new/src/test_libs_common/metadata_utils.c 2009-08-23 12:33:09.000000000 +0200
@@ -61,7 +61,7 @@
return false; return false;
} }
if(blockcopy->total_samples != block->total_samples) { if(blockcopy->total_samples != block->total_samples) {
...@@ -282,7 +265,7 @@ index fe192e7..75ad60f 100644 ...@@ -282,7 +265,7 @@ index fe192e7..75ad60f 100644
printf("FAILED, total_samples mismatch, expected %I64u, got %I64u\n", block->total_samples, blockcopy->total_samples); printf("FAILED, total_samples mismatch, expected %I64u, got %I64u\n", block->total_samples, blockcopy->total_samples);
#else #else
printf("FAILED, total_samples mismatch, expected %llu, got %llu\n", (unsigned long long)block->total_samples, (unsigned long long)blockcopy->total_samples); printf("FAILED, total_samples mismatch, expected %llu, got %llu\n", (unsigned long long)block->total_samples, (unsigned long long)blockcopy->total_samples);
@@ -166,7 +166,7 @@ FLAC__bool mutils__compare_block_data_seektable(const FLAC__StreamMetadata_SeekT @@ -166,7 +166,7 @@
} }
for(i = 0; i < block->num_points; i++) { for(i = 0; i < block->num_points; i++) {
if(blockcopy->points[i].sample_number != block->points[i].sample_number) { if(blockcopy->points[i].sample_number != block->points[i].sample_number) {
...@@ -291,7 +274,7 @@ index fe192e7..75ad60f 100644 ...@@ -291,7 +274,7 @@ index fe192e7..75ad60f 100644
printf("FAILED, points[%u].sample_number mismatch, expected %I64u, got %I64u\n", i, block->points[i].sample_number, blockcopy->points[i].sample_number); printf("FAILED, points[%u].sample_number mismatch, expected %I64u, got %I64u\n", i, block->points[i].sample_number, blockcopy->points[i].sample_number);
#else #else
printf("FAILED, points[%u].sample_number mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->points[i].sample_number, (unsigned long long)blockcopy->points[i].sample_number); printf("FAILED, points[%u].sample_number mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->points[i].sample_number, (unsigned long long)blockcopy->points[i].sample_number);
@@ -174,7 +174,7 @@ FLAC__bool mutils__compare_block_data_seektable(const FLAC__StreamMetadata_SeekT @@ -174,7 +174,7 @@
return false; return false;
} }
if(blockcopy->points[i].stream_offset != block->points[i].stream_offset) { if(blockcopy->points[i].stream_offset != block->points[i].stream_offset) {
...@@ -300,7 +283,7 @@ index fe192e7..75ad60f 100644 ...@@ -300,7 +283,7 @@ index fe192e7..75ad60f 100644
printf("FAILED, points[%u].stream_offset mismatch, expected %I64u, got %I64u\n", i, block->points[i].stream_offset, blockcopy->points[i].stream_offset); printf("FAILED, points[%u].stream_offset mismatch, expected %I64u, got %I64u\n", i, block->points[i].stream_offset, blockcopy->points[i].stream_offset);
#else #else
printf("FAILED, points[%u].stream_offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->points[i].stream_offset, (unsigned long long)blockcopy->points[i].stream_offset); printf("FAILED, points[%u].stream_offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->points[i].stream_offset, (unsigned long long)blockcopy->points[i].stream_offset);
@@ -240,7 +240,7 @@ FLAC__bool mutils__compare_block_data_cuesheet(const FLAC__StreamMetadata_CueShe @@ -240,7 +240,7 @@
return false; return false;
} }
if(blockcopy->lead_in != block->lead_in) { if(blockcopy->lead_in != block->lead_in) {
...@@ -309,7 +292,7 @@ index fe192e7..75ad60f 100644 ...@@ -309,7 +292,7 @@ index fe192e7..75ad60f 100644
printf("FAILED, lead_in mismatch, expected %I64u, got %I64u\n", block->lead_in, blockcopy->lead_in); printf("FAILED, lead_in mismatch, expected %I64u, got %I64u\n", block->lead_in, blockcopy->lead_in);
#else #else
printf("FAILED, lead_in mismatch, expected %llu, got %llu\n", (unsigned long long)block->lead_in, (unsigned long long)blockcopy->lead_in); printf("FAILED, lead_in mismatch, expected %llu, got %llu\n", (unsigned long long)block->lead_in, (unsigned long long)blockcopy->lead_in);
@@ -257,7 +257,7 @@ FLAC__bool mutils__compare_block_data_cuesheet(const FLAC__StreamMetadata_CueShe @@ -257,7 +257,7 @@
} }
for(i = 0; i < block->num_tracks; i++) { for(i = 0; i < block->num_tracks; i++) {
if(blockcopy->tracks[i].offset != block->tracks[i].offset) { if(blockcopy->tracks[i].offset != block->tracks[i].offset) {
...@@ -318,7 +301,7 @@ index fe192e7..75ad60f 100644 ...@@ -318,7 +301,7 @@ index fe192e7..75ad60f 100644
printf("FAILED, tracks[%u].offset mismatch, expected %I64u, got %I64u\n", i, block->tracks[i].offset, blockcopy->tracks[i].offset); printf("FAILED, tracks[%u].offset mismatch, expected %I64u, got %I64u\n", i, block->tracks[i].offset, blockcopy->tracks[i].offset);
#else #else
printf("FAILED, tracks[%u].offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->tracks[i].offset, (unsigned long long)blockcopy->tracks[i].offset); printf("FAILED, tracks[%u].offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)block->tracks[i].offset, (unsigned long long)blockcopy->tracks[i].offset);
@@ -295,7 +295,7 @@ FLAC__bool mutils__compare_block_data_cuesheet(const FLAC__StreamMetadata_CueShe @@ -295,7 +295,7 @@
else { else {
for(j = 0; j < block->tracks[i].num_indices; j++) { for(j = 0; j < block->tracks[i].num_indices; j++) {
if(blockcopy->tracks[i].indices[j].offset != block->tracks[i].indices[j].offset) { if(blockcopy->tracks[i].indices[j].offset != block->tracks[i].indices[j].offset) {
...@@ -327,10 +310,9 @@ index fe192e7..75ad60f 100644 ...@@ -327,10 +310,9 @@ index fe192e7..75ad60f 100644
printf("FAILED, tracks[%u].indices[%u].offset mismatch, expected %I64u, got %I64u\n", i, j, block->tracks[i].indices[j].offset, blockcopy->tracks[i].indices[j].offset); printf("FAILED, tracks[%u].indices[%u].offset mismatch, expected %I64u, got %I64u\n", i, j, block->tracks[i].indices[j].offset, blockcopy->tracks[i].indices[j].offset);
#else #else
printf("FAILED, tracks[%u].indices[%u].offset mismatch, expected %llu, got %llu\n", i, j, (unsigned long long)block->tracks[i].indices[j].offset, (unsigned long long)blockcopy->tracks[i].indices[j].offset); printf("FAILED, tracks[%u].indices[%u].offset mismatch, expected %llu, got %llu\n", i, j, (unsigned long long)block->tracks[i].indices[j].offset, (unsigned long long)blockcopy->tracks[i].indices[j].offset);
diff --git a/src/test_seeking/main.c b/src/test_seeking/main.c diff -ruN flac/src/test_seeking/main.c flac.new/src/test_seeking/main.c
index 11b549a..985378e 100644 --- flac/src/test_seeking/main.c 2007-09-11 09:32:03.000000000 +0200
--- a/src/test_seeking/main.c +++ flac.new/src/test_seeking/main.c 2009-08-23 12:33:09.000000000 +0200
+++ b/src/test_seeking/main.c
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -340,7 +322,7 @@ index 11b549a..985378e 100644 ...@@ -340,7 +322,7 @@ index 11b549a..985378e 100644
#include <time.h> #include <time.h>
#else #else
#include <sys/time.h> #include <sys/time.h>
@@ -200,7 +200,7 @@ static FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__StreamDecoder @@ -200,7 +200,7 @@
FLAC__ASSERT(frame->header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER); /* decoder guarantees this */ FLAC__ASSERT(frame->header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER); /* decoder guarantees this */
if (!dcd->quiet) if (!dcd->quiet)
...@@ -349,7 +331,7 @@ index 11b549a..985378e 100644 ...@@ -349,7 +331,7 @@ index 11b549a..985378e 100644
printf("frame@%I64u(%u)... ", frame->header.number.sample_number, frame->header.blocksize); printf("frame@%I64u(%u)... ", frame->header.number.sample_number, frame->header.blocksize);
#else #else
printf("frame@%llu(%u)... ", (unsigned long long)frame->header.number.sample_number, frame->header.blocksize); printf("frame@%llu(%u)... ", (unsigned long long)frame->header.number.sample_number, frame->header.blocksize);
@@ -309,7 +309,7 @@ static FLAC__bool seek_barrage(FLAC__bool is_ogg, const char *filename, off_t fi @@ -309,7 +309,7 @@
return die_s_("expected FLAC__STREAM_DECODER_END_OF_STREAM", decoder); return die_s_("expected FLAC__STREAM_DECODER_END_OF_STREAM", decoder);
} }
...@@ -358,7 +340,7 @@ index 11b549a..985378e 100644 ...@@ -358,7 +340,7 @@ index 11b549a..985378e 100644
printf("file's total_samples is %I64u\n", decoder_client_data.total_samples); printf("file's total_samples is %I64u\n", decoder_client_data.total_samples);
#else #else
printf("file's total_samples is %llu\n", (unsigned long long)decoder_client_data.total_samples); printf("file's total_samples is %llu\n", (unsigned long long)decoder_client_data.total_samples);
@@ -347,7 +347,7 @@ static FLAC__bool seek_barrage(FLAC__bool is_ogg, const char *filename, off_t fi @@ -347,7 +347,7 @@
pos = (FLAC__uint64)(local_rand_() % n); pos = (FLAC__uint64)(local_rand_() % n);
} }
...@@ -367,6 +349,3 @@ index 11b549a..985378e 100644 ...@@ -367,6 +349,3 @@ index 11b549a..985378e 100644
printf("#%u:seek(%I64u)... ", i, pos); printf("#%u:seek(%I64u)... ", i, pos);
#else #else
printf("#%u:seek(%llu)... ", i, (unsigned long long)pos); printf("#%u:seek(%llu)... ", i, (unsigned long long)pos);
--
1.6.4.53.g3f55e
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment