(360 Salamander) Build fix/make dir_list C89-compatible

This commit is contained in:
twinaphex 2014-10-22 01:16:57 +02:00
parent 174d011bed
commit bf147b41e2
3 changed files with 16 additions and 10 deletions

View File

@ -94,17 +94,16 @@ void dir_list_free(struct string_list *list)
struct string_list *dir_list_new(const char *dir,
const char *ext, bool include_dirs)
{
struct string_list *list = string_list_new();
char path_buf[PATH_MAX];
WIN32_FIND_DATA ffd;
struct string_list *ext_list = NULL, *list = NULL;
HANDLE hFind = INVALID_HANDLE_VALUE;
list = string_list_new();
if (!list)
return NULL;
HANDLE hFind = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA ffd;
char path_buf[PATH_MAX];
snprintf(path_buf, sizeof(path_buf), "%s\\*", dir);
struct string_list *ext_list = NULL;
if (ext)
ext_list = string_split(ext, "|");

View File

@ -270,7 +270,6 @@
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\..\dir_list.c" />
<ClCompile Include="..\..\libretro-sdk\compat\compat.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>
@ -279,6 +278,14 @@
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="..\..\libretro-sdk\file\dir_list.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="..\..\libretro-sdk\file\file_path.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>

View File

@ -23,9 +23,6 @@
<ClCompile Include="..\..\conf\config_file.c">
<Filter>Source Files\conf</Filter>
</ClCompile>
<ClCompile Include="..\..\dir_list.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\frontend\frontend_salamander.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -47,5 +44,8 @@
<ClCompile Include="..\..\libretro-sdk\string\string_list.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\libretro-sdk\file\dir_list.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>