try to limit the #defines (of fseeko to fseek and ftello to ftell) to just the versio...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 3 Oct 2006 01:16:59 +0000 (01:16 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 3 Oct 2006 01:16:59 +0000 (01:16 +0000)
13 files changed:
src/flac/decode.c
src/flac/encode.c
src/libFLAC/metadata_iterators.c
src/libFLAC/stream_decoder.c
src/libFLAC/stream_encoder.c
src/libOggFLAC/stream_decoder.c
src/libOggFLAC/stream_encoder.c
src/test_libFLAC++/decoders.cpp
src/test_libFLAC++/metadata_manip.cpp
src/test_libFLAC/decoders.c
src/test_libFLAC/metadata_manip.c
src/test_libOggFLAC++/decoders.cpp
src/test_libOggFLAC/decoders.c

index a7a122f..7639557 100644 (file)
 #endif
 #if defined _MSC_VER || defined __MINGW32__
 #include <sys/types.h> /* for off_t */
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include <errno.h>
 #include <math.h> /* for floor() */
 #include <stdio.h> /* for FILE etc. */
@@ -647,7 +648,7 @@ FLAC__bool write_iff_headers(FILE *f, DecoderSession *decoder_session, FLAC__uin
                if(!write_little_endian_uint32(f, decoder_session->sample_rate))
                        return false;
 
-               if(!write_little_endian_uint32(f, decoder_session->sample_rate * decoder_session->channels * ((decoder_session->bps+7) / 8))) /* @@@ or is it (sample_rate*channels*bps) / 8 ??? */
+               if(!write_little_endian_uint32(f, decoder_session->sample_rate * decoder_session->channels * ((decoder_session->bps+7) / 8)))
                        return false;
 
                if(!write_little_endian_uint16(f, (FLAC__uint16)(decoder_session->channels * ((decoder_session->bps+7) / 8)))) /* block align */
index 52cc6cc..2470549 100644 (file)
 #endif
 #if defined _MSC_VER || defined __MINGW32__
 #include <sys/types.h> /* for off_t */
-//@@@@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include <errno.h>
 #include <limits.h> /* for LONG_MAX */
 #include <math.h> /* for floor() */
index c4e53fd..fc6adee 100644 (file)
 #include <sys/utime.h> /* for utime() */
 #include <io.h> /* for chmod() */
 #include <sys/types.h> /* for off_t */
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
+#endif
 #else
 #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
 #include <utime.h> /* for utime() */
index b9e0957..7441ba4 100644 (file)
 #include <sys/stat.h> /* for stat() */
 #include <sys/types.h> /* for off_t */
 #if defined _MSC_VER || defined __MINGW32__
-/*@@@ [2G limit] hacks for MSVC6 */
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "FLAC/assert.h"
 #include "protected/stream_decoder.h"
 #include "private/bitbuffer.h"
index 50d792f..ead38c0 100644 (file)
 #include <string.h> /* for memcpy() */
 #include <sys/types.h> /* for off_t */
 #if defined _MSC_VER || defined __MINGW32__
-/*@@@ [2G limit] hacks for MSVC6 */
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "FLAC/assert.h"
 #include "FLAC/stream_decoder.h"
 #include "protected/stream_encoder.h"
index c39e952..edbfbc0 100644 (file)
 #include <sys/stat.h> /* for stat() */
 #include <sys/types.h> /* for off_t */
 #if defined _MSC_VER || defined __MINGW32__
-/*@@@ [2G limit] hacks for MSVC6 */
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "FLAC/assert.h"
 #include "protected/stream_decoder.h"
 #include "../libFLAC/include/private/float.h" /* @@@ ugly hack, but how else to do?  we need to reuse the float formats but don't want to expose it */
index 04a6d42..742ff65 100644 (file)
 #include <string.h> /* for memcpy() */
 #include <sys/types.h> /* for off_t */
 #if defined _MSC_VER || defined __MINGW32__
-/*@@@@@@ [2G limit] hacks for MSVC6 */
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "FLAC/assert.h"
 #include "OggFLAC/stream_encoder.h"
 #include "protected/stream_encoder.h"
index 976342d..f9d2b52 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #if defined _MSC_VER || defined __MINGW32__
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "decoders.h"
 #include "FLAC/assert.h"
 #include "FLAC/metadata.h" // for ::FLAC__metadata_object_is_equal()
index 52a0bc5..89feae1 100644 (file)
 #if defined _MSC_VER || defined __MINGW32__
 #include <sys/utime.h> /* for utime() */
 #include <io.h> /* for chmod() */
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
+#endif
 #else
 #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
 #include <utime.h> /* for utime() */
index 3765853..5c9eeda 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #if defined _MSC_VER || defined __MINGW32__
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "decoders.h"
 #include "FLAC/assert.h"
 #include "FLAC/stream_decoder.h"
index 954e7ab..4896c12 100644 (file)
 #if defined _MSC_VER || defined __MINGW32__
 #include <sys/utime.h> /* for utime() */
 #include <io.h> /* for chmod() */
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
+#endif
 #else
 #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
 #include <utime.h> /* for utime() */
index 9a91ab9..002150b 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #if defined _MSC_VER || defined __MINGW32__
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "decoders.h"
 #include "FLAC/assert.h"
 #include "FLAC/metadata.h" // for ::FLAC__metadata_object_is_equal()
index 4eea85d..05b0eb9 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #if defined _MSC_VER || defined __MINGW32__
-//@@@ [2G limit] hacks for MSVC6
+#if _MSC_VER <= 1200 /* @@@ [2G limit] */
 #define fseeko fseek
 #define ftello ftell
 #endif
+#endif
 #include "decoders.h"
 #include "FLAC/assert.h"
 #include "OggFLAC/stream_decoder.h"
@@ -36,7 +37,7 @@
 #include "test_libs_common/file_utils_oggflac.h"
 #include "test_libs_common/metadata_utils.h"
 
-//@@@@@@ this is almost exactly like test_libFLAC/decoders.c, maybe should consolidate some stuff liek client data and callbacks
+//@@@@@@ this is almost exactly like test_libFLAC/decoders.c, maybe should consolidate some stuff like client data and callbacks
 typedef enum {
        LAYER_STREAM = 0, /* FLAC__stream_decoder_init_stream() without seeking */
        LAYER_SEEKABLE_STREAM, /* FLAC__stream_decoder_init_stream() with seeking */