From 1e9e707c6f69ae8937975d3478d474229bcaf821 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Thu, 19 Jan 2017 06:30:45 +1100 Subject: [PATCH] stdint.h fixes for MSVS 2005/2008 This adds a new msvc2005_int.h header file which is "force included" as needed by the MSVS project file. Patch-from: lvqcl --- .../c/decode/file/example_c_decode_file.vcproj | 2 ++ .../c/encode/file/example_c_encode_file.vcproj | 2 ++ .../decode/file/example_cpp_decode_file.vcproj | 2 ++ .../encode/file/example_cpp_encode_file.vcproj | 2 ++ include/FLAC/ordinals.h | 17 ++++++++--------- include/share/Makefile.am | 1 + include/share/compat.h | 8 -------- src/flac/flac.vcproj | 2 ++ src/flac/iffscan.vcproj | 2 ++ src/libFLAC++/libFLAC++_dynamic.vcproj | 2 ++ src/libFLAC++/libFLAC++_static.vcproj | 2 ++ src/libFLAC/libFLAC_dynamic.vcproj | 2 ++ src/libFLAC/libFLAC_static.vcproj | 2 ++ src/metaflac/metaflac.vcproj | 2 ++ src/share/getopt/getopt_static.vcproj | 2 ++ src/share/grabbag/grabbag_static.vcproj | 2 ++ .../replaygain_analysis_static.vcproj | 2 ++ .../replaygain_synthesis_static.vcproj | 2 ++ src/share/utf8/utf8_static.vcproj | 2 ++ src/share/win_utf8_io/win_utf8_io_static.vcproj | 2 ++ src/test_grabbag/cuesheet/test_cuesheet.vcproj | 2 ++ src/test_grabbag/picture/test_picture.vcproj | 2 ++ src/test_libFLAC++/test_libFLAC++.vcproj | 2 ++ src/test_libFLAC/test_libFLAC.vcproj | 2 ++ .../test_libs_common_static.vcproj | 2 ++ src/test_seeking/test_seeking.vcproj | 2 ++ src/test_streams/test_streams.vcproj | 2 ++ src/utils/flacdiff/flacdiff.vcproj | 2 ++ src/utils/flactimer/flactimer.vcproj | 2 ++ 29 files changed, 61 insertions(+), 17 deletions(-) diff --git a/examples/c/decode/file/example_c_decode_file.vcproj b/examples/c/decode/file/example_c_decode_file.vcproj index 15f108cc..ddd20bca 100644 --- a/examples/c/decode/file/example_c_decode_file.vcproj +++ b/examples/c/decode/file/example_c_decode_file.vcproj @@ -50,6 +50,7 @@ DebugInformationFormat="4" CompileAs="0" DisableSpecificWarnings="4267;4996" + ForcedIncludeFiles="share/msvc2005_int.h" /> . */ -typedef __int8 FLAC__int8; -typedef uint32_t __int8 FLAC__uint8; - -typedef __int16 FLAC__int16; -typedef __int32 FLAC__int32; -typedef __int64 FLAC__int64; -typedef uint32_t __int16 FLAC__uint16; -typedef uint32_t __int32 FLAC__uint32; -typedef uint32_t __int64 FLAC__uint64; +typedef signed __int8 FLAC__int8; +typedef signed __int16 FLAC__int16; +typedef signed __int32 FLAC__int32; +typedef signed __int64 FLAC__int64; +typedef unsigned __int8 FLAC__uint8; +typedef unsigned __int16 FLAC__uint16; +typedef unsigned __int32 FLAC__uint32; +typedef unsigned __int64 FLAC__uint64; #else diff --git a/include/share/Makefile.am b/include/share/Makefile.am index 2d8ca503..079c1690 100644 --- a/include/share/Makefile.am +++ b/include/share/Makefile.am @@ -9,6 +9,7 @@ EXTRA_DIST = \ getopt.h \ grabbag.h \ macros.h \ + msvc2005_int.h \ private.h \ replaygain_analysis.h \ replaygain_synthesis.h \ diff --git a/include/share/compat.h b/include/share/compat.h index 2083f3a2..94edbd21 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -130,14 +130,6 @@ # ifndef UINT32_MAX # define UINT32_MAX _UI32_MAX # endif - typedef unsigned __int64 uint64_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int8 uint8_t; - typedef __int64 int64_t; - typedef __int32 int32_t; - typedef __int16 int16_t; - typedef __int8 int8_t; # define PRIu64 "I64u" # define PRId64 "I64d" # define PRIx64 "I64x" diff --git a/src/flac/flac.vcproj b/src/flac/flac.vcproj index ace4e3c4..0c962b1b 100644 --- a/src/flac/flac.vcproj +++ b/src/flac/flac.vcproj @@ -50,6 +50,7 @@ DebugInformationFormat="4" CompileAs="0" DisableSpecificWarnings="4267;4996" + ForcedIncludeFiles="share/msvc2005_int.h" />