Huge Windows utf8 I/O patch.

Patch from Janne Hyvärinen <cse@sci.fi>.
This commit is contained in:
Erik de Castro Lopo
2013-03-21 19:18:49 +11:00
parent 9b8fdafe3a
commit 5705b4d7b2
68 changed files with 3200 additions and 299 deletions

View File

@@ -81,7 +81,7 @@ FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_f
FLAC__ASSERT(streaminfo->type == FLAC__METADATA_TYPE_STREAMINFO);
FLAC__ASSERT((streaminfo->is_last && num_metadata == 0) || (!streaminfo->is_last && num_metadata > 0));
if(0 == (encoder_client_data.file = fopen(output_filename, "wb")))
if(0 == (encoder_client_data.file = flac_fopen(output_filename, "wb")))
return false;
encoder = FLAC__stream_encoder_new();
@@ -142,15 +142,9 @@ FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_f
FLAC__stream_encoder_delete(encoder);
if(0 != output_filesize) {
#if defined _MSC_VER || defined __MINGW32__
struct _stat64 filestats;
struct _flac_stat filestats;
if(_stat64(output_filename, &filestats) != 0)
#else
struct stat filestats;
if(stat(output_filename, &filestats) != 0)
#endif
if(flac_stat(output_filename, &filestats) != 0)
return false;
else
*output_filesize = filestats.st_size;

View File

@@ -147,6 +147,73 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release (UTF8)|Win32"
OutputDirectory="..\..\objs\release\lib"
IntermediateDirectory="Release_static"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories=".\include;..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLAC__NO_DLL;FLAC__STRINGS_IN_UTF8"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings="4267;4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\objs\release\lib\$(ProjectName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>