flac_mac patches from Janne Hyvärinen <cse@sci.fi>.

This commit is contained in:
Erik de Castro Lopo
2013-04-02 06:37:08 +11:00
parent 1e89230c3e
commit ae5cc0c046
2 changed files with 8 additions and 4 deletions

View File

@@ -39,6 +39,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -116,6 +117,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
RuntimeLibrary="0"
BufferSecurityCheck="false"
@@ -195,6 +197,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
BufferSecurityCheck="false"

View File

@@ -33,6 +33,7 @@
#include<process.h>
#include<winbase.h>
#include "share/compat.h"
#include "share/safe_str.h"
static int execit(char *prog, char *args);
@@ -106,8 +107,8 @@ int main(int argc, char *argv[])
flac_snprintf(options, sizeof (options), "-%d", flac_level);
for(i = opt_arg; i < argc; i++)
if(argv[i][0] == '-') {
safe_strncat(options, " ");
safe_strncat(options, argv[i]);
safe_strncat(options, " ", sizeof(options));
safe_strncat(options, argv[i], sizeof(options));
}
flac_snprintf(cmdline, sizeof (cmdline), "\"%s\" %s -o \"%s\" \"%s\"", prog, options, argv[to_arg], argv[from_arg]);
@@ -131,8 +132,8 @@ int main(int argc, char *argv[])
/* for the full 'from' and 'to' paths for the renamer process */
p = strrchr(argv[from_arg],'\\');
safe_strncat(from, p? p+1 : argv[from_arg]);
safe_strncpy(to, from, sizeof(to));
safe_strncat(from, p? p+1 : argv[from_arg], sizeof(from));
safe_strncpy(to, from, sizeof(to), sizeof(to));
cptr = strrchr(from,'.');
if(cptr == NULL)