libFLAC: Remove win_utf8_io dependency
authorErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 5 Feb 2016 00:02:44 +0000 (11:02 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 8 Feb 2016 11:04:12 +0000 (22:04 +1100)
Path-from: lvqcl <lvqcl.mail@gmail.com>

51 files changed:
FLAC-vs2005.sln
Makefile.deps
Makefile.lite
examples/c/decode/file/Makefile.lite
examples/c/decode/file/example_c_decode_file.vcxproj
examples/c/encode/file/Makefile.lite
examples/c/encode/file/example_c_encode_file.vcxproj
examples/cpp/decode/file/Makefile.lite
examples/cpp/decode/file/example_cpp_decode_file.vcxproj
examples/cpp/encode/file/Makefile.lite
examples/cpp/encode/file/example_cpp_encode_file.vcxproj
include/share/Makefile.am
include/share/compat.h
include/share/win_utf8_io.h
src/Makefile.am
src/flac/Makefile.am
src/libFLAC++/Makefile.lite
src/libFLAC++/libFLAC++_dynamic.vcxproj
src/libFLAC++/libFLAC++_static.vcxproj
src/libFLAC/Makefile.am
src/libFLAC/Makefile.lite
src/libFLAC/libFLAC_dynamic.vcproj
src/libFLAC/libFLAC_dynamic.vcxproj
src/libFLAC/libFLAC_dynamic.vcxproj.filters
src/libFLAC/libFLAC_static.vcproj
src/libFLAC/libFLAC_static.vcxproj
src/libFLAC/libFLAC_static.vcxproj.filters
src/metaflac/Makefile.am
src/plugin_common/Makefile.lite
src/plugin_xmms/Makefile.lite
src/share/Makefile.am
src/share/grabbag/Makefile.lite
src/share/grabbag/grabbag_static.vcxproj
src/share/win_utf8_io/Makefile.lite
src/share/win_utf8_io/win_utf8_io.c
src/test_grabbag/cuesheet/Makefile.lite
src/test_grabbag/cuesheet/test_cuesheet.vcxproj
src/test_grabbag/picture/Makefile.am
src/test_grabbag/picture/Makefile.lite
src/test_grabbag/picture/test_picture.vcxproj
src/test_libFLAC++/Makefile.lite
src/test_libFLAC++/test_libFLAC++.vcxproj
src/test_libFLAC/Makefile.am
src/test_libFLAC/Makefile.lite
src/test_libFLAC/test_libFLAC.vcxproj
src/test_libs_common/Makefile.am
src/test_libs_common/Makefile.lite
src/test_libs_common/test_libs_common_static.vcxproj
src/test_seeking/Makefile.lite
src/test_seeking/test_seeking.vcxproj
src/utils/flactimer/Makefile.lite

index 41c842a..24fbacd 100644 (file)
@@ -4,27 +4,23 @@ Microsoft Visual Studio Solution File, Format Version 9.00
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_c_decode_file", "examples\c\decode\file\example_c_decode_file.vcproj", "{4CEFBD00-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_c_encode_file", "examples\c\encode\file\example_c_encode_file.vcproj", "{4CEFBD01-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_cpp_decode_file", "examples\cpp\decode\file\example_cpp_decode_file.vcproj", "{4CEFBE00-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_cpp_encode_file", "examples\cpp\encode\file\example_cpp_encode_file.vcproj", "{4CEFBE01-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flac", "src\flac\flac.vcproj", "{4CEFBC7D-C215-11DB-8314-0800200C9A66}"\r
@@ -59,29 +55,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grabbag_static", "src\share
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC89-C215-11DB-8314-0800200C9A66} = {4CEFBC89-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_dynamic", "src\libFLAC\libFLAC_dynamic.vcproj", "{4CEFBC83-C215-11DB-8314-0800200C9A66}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
-       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_static", "src\libFLAC\libFLAC_static.vcproj", "{4CEFBC84-C215-11DB-8314-0800200C9A66}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
-       EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC++_dynamic", "src\libFLAC++\libFLAC++_dynamic.vcproj", "{4CEFBC85-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC83-C215-11DB-8314-0800200C9A66} = {4CEFBC83-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC++_static", "src\libFLAC++\libFLAC++_static.vcproj", "{4CEFBC86-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "metaflac", "src\metaflac\metaflac.vcproj", "{4CEFBC87-C215-11DB-8314-0800200C9A66}"\r
@@ -102,7 +89,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_cuesheet", "src\test_g
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC", "src\test_libFLAC\test_libFLAC.vcproj", "{4CEFBC8C-C215-11DB-8314-0800200C9A66}"\r
@@ -110,7 +96,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC", "src\test_li
                {4CEFBC8E-C215-11DB-8314-0800200C9A66} = {4CEFBC8E-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC++", "src\test_libFLAC++\test_libFLAC++.vcproj", "{4CEFBC8D-C215-11DB-8314-0800200C9A66}"\r
@@ -119,26 +104,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC++", "src\test_
                {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC8E-C215-11DB-8314-0800200C9A66} = {4CEFBC8E-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libs_common_static", "src\test_libs_common\test_libs_common_static.vcproj", "{4CEFBC8E-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_picture", "src\test_grabbag\picture\test_picture.vcproj", "{4CEFBC8F-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
                {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_seeking", "src\test_seeking\test_seeking.vcproj", "{4CEFBC90-C215-11DB-8314-0800200C9A66}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}\r
-               {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_streams\test_streams.vcproj", "{4CEFBC91-C215-11DB-8314-0800200C9A66}"\r
index c262daa..d2dc440 100644 (file)
 #  distribution.
 
 ifeq ($(findstring Windows,$(OS)),Windows) # "Windows" is provided by GNU Make's internal $(OS)
-    LIBFLAC_DEPS = share/win_utf8_io
+    WIN_DEPS = share/win_utf8_io
 else
-    LIBFLAC_DEPS =
+    WIN_DEPS =
 endif
 
-libFLAC: $(LIBFLAC_DEPS)
-flac: libFLAC share
+flac: libFLAC share $(WIN_DEPS)
 libFLAC++: libFLAC
-metaflac: libFLAC share
+metaflac: libFLAC share $(WIN_DEPS)
 plugin_common: libFLAC
 plugin_xmms: libFLAC plugin_common
 share: libFLAC
@@ -34,7 +33,7 @@ test_libs_common: libFLAC
 test_libFLAC++: libFLAC libFLAC++ test_libs_common
 test_libFLAC: libFLAC test_libs_common
 test_seeking: libFLAC
-test_streams: libFLAC
-flacdiff: libFLAC libFLAC++
-flactimer: libFLAC libFLAC++
+test_streams: share
+flacdiff: libFLAC libFLAC++ $(WIN_DEPS)
+flactimer:
 utils: flacdiff flactimer
index 4453474..6c2a982 100644 (file)
@@ -31,7 +31,7 @@
 
 topdir = .
 
-.PHONY: all doc src examples libFLAC libFLAC++ share/win_utf8_io share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
+.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
 all: src examples
 
 DEFAULT_CONFIG = release
@@ -52,7 +52,7 @@ doc:
 src examples:
        (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
-libFLAC libFLAC++ share/win_utf8_io share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
+libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
        (cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
 flacdiff flactimer:
index c0b52e3..c24eeb5 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
index 3b16664..db14265 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 9bae4b9..07f147e 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
index 60bf39c..edf464b 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index fe9a31a..b559edc 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
index d105bb4..6dde67e 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index cc5583f..43a952e 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
index 793f62c..271b50a 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index a6a3ca0..2d8ca50 100644 (file)
@@ -14,4 +14,5 @@ EXTRA_DIST = \
        replaygain_synthesis.h \
        safe_str.h \
        utf8.h \
-       win_utf8_io.h
+       win_utf8_io.h \
+       windows_unicode_filenames.h
index 34d32db..4332b5c 100644 (file)
 
 #ifdef _WIN32
 /* All char* strings are in UTF-8 format. Added to support Unicode files on Windows */
-#include "share/win_utf8_io.h"
 
+#include "share/win_utf8_io.h"
 #define flac_printf printf_utf8
 #define flac_fprintf fprintf_utf8
 #define flac_vfprintf vfprintf_utf8
 
-#define flac_fopen fopen_utf8
-#define flac_chmod chmod_utf8
-#define flac_utime utime_utf8
-#define flac_unlink unlink_utf8
-#define flac_rename rename_utf8
-#define flac_stat _stat64_utf8
+#include "share/windows_unicode_filenames.h"
+#define flac_fopen flac_internal_fopen_utf8
+#define flac_chmod flac_internal_chmod_utf8
+#define flac_utime flac_internal_utime_utf8
+#define flac_unlink flac_internal_unlink_utf8
+#define flac_rename flac_internal_rename_utf8
+#define flac_stat flac_internal_stat64_utf8
 
 #else
 
index ba9ad75..5baefcc 100644 (file)
 #ifndef flac__win_utf8_io_h
 #define flac__win_utf8_io_h
 
+#include <stdio.h>
+#include <stdarg.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <stdio.h>
-#include <sys/stat.h>
-#include <stdarg.h>
-#include <windows.h>
-
 size_t strlen_utf8(const char *str);
 int win_get_console_width(void);
 
index 5941738..42ec50c 100644 (file)
@@ -25,8 +25,8 @@ CPPLIBS_DIRS = libFLAC++ test_libFLAC++
 endif
 
 SUBDIRS = \
-       share \
        libFLAC \
+       share \
        flac \
        metaflac \
        $(XMMS_DIRS) \
index 7103d9d..117b913 100644 (file)
@@ -48,6 +48,10 @@ flac_SOURCES = \
        utils.h \
        vorbiscomment.h
 
+if OS_IS_WINDOWS
+win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
+endif
+
 flac_LDADD = \
        $(top_builddir)/src/share/utf8/libutf8.la \
        $(top_builddir)/src/share/grabbag/libgrabbag.la \
@@ -55,6 +59,7 @@ flac_LDADD = \
        $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
        $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
        $(top_builddir)/src/libFLAC/libFLAC.la \
+       $(win_utf8_lib) \
        @LIBICONV@ \
        -lm
 
index 800d3e7..6ddd941 100644 (file)
@@ -43,16 +43,12 @@ endif
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -lsupc++
-else
 ifeq ($(OS),FreeBSD)
     LIBS = -lFLAC $(OGG_LIBS) -lm -lstdc++
 else
     LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++
 endif
 endif
-endif
 
 LIB_NAME = libFLAC++
 INCLUDES = -I$(topdir)/include
index e79e2dc..12b4fb0 100644 (file)
       <Project>{4cefbc83-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index d45f1ee..21994bd 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 276e334..004e149 100644 (file)
@@ -61,11 +61,7 @@ endif
 endif
 endif
 
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
-
-libFLAC_la_LIBADD = $(win_utf8_lib) $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm
+libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm
 
 SUBDIRS = $(ARCH_SUBDIRS) include .
 
@@ -86,6 +82,10 @@ EXTRA_DIST = \
        libFLAC_static.vcxproj.filters \
        libFLAC.m4
 
+if OS_IS_WINDOWS
+windows_unicode_compat = windows_unicode_filenames.c
+endif
+
 if FLaC__HAS_OGG
 extra_ogg_sources = \
        ogg_decoder_aspect.c \
@@ -124,6 +124,7 @@ libFLAC_sources = \
        stream_encoder_intrin_avx2.c \
        stream_encoder_framing.c \
        window.c \
+       $(windows_unicode_compat) \
        $(extra_ogg_sources)
 
 libFLAC_la_SOURCES = $(libFLAC_sources)
index 722acfb..9fc2245 100644 (file)
@@ -38,11 +38,11 @@ topdir = ../..
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = $(OGG_LIBS) -lm
 endif
+
+ifeq ($(findstring Windows,$(OS)),Windows)
+    WIN_UNICODE_COMPAT = windows_unicode_filenames.c
 endif
 
 LIB_NAME = libFLAC
@@ -102,6 +102,7 @@ SRCS_C = \
        stream_encoder_intrin_avx2.c \
        stream_encoder_framing.c \
        window.c \
+       $(WIN_UNICODE_COMPAT) \
        $(OGG_SRCS)
 
 include $(topdir)/build/lib.mk
index debbb73..cd32dee 100644 (file)
                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
-                               RelativePath=".\include\private\all.h"\r
+                               RelativePath=".\include\protected\all.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\protected\all.h"\r
+                               RelativePath=".\include\private\all.h"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\protected\stream_encoder.h"\r
+                               RelativePath=".\include\private\stream_encoder.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\private\stream_encoder.h"\r
+                               RelativePath=".\include\protected\stream_encoder.h"\r
                                >\r
                        </File>\r
                        <File\r
                                RelativePath=".\window.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath=".\windows_unicode_filenames.c"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="Public Header Files"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\alloc.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\assert.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\compat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\endswap.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\export.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\macros.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\metadata.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\private.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\safe_str.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\stream_decoder.h"\r
                                >\r
                        </File>\r
                                RelativePath="..\..\include\FLAC\stream_encoder.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\windows_unicode_filenames.h"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <File\r
                        RelativePath=".\ia32\cpu_asm.nasm"\r
index 89f24e2..6dab4b4 100644 (file)
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />\r
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />\r
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />\r
+    <ClInclude Include="..\..\include\share\alloc.h" />\r
+    <ClInclude Include="..\..\include\share\compat.h" />\r
+    <ClInclude Include="..\..\include\share\endswap.h" />\r
+    <ClInclude Include="..\..\include\share\macros.h" />\r
+    <ClInclude Include="..\..\include\share\private.h" />\r
+    <ClInclude Include="..\..\include\share\safe_str.h" />\r
+    <ClInclude Include="..\..\include\share\windows_unicode_filenames.h" />\r
     <ClInclude Include="ia32\nasm.h" />\r
     <ClInclude Include="include\private\all.h" />\r
     <ClInclude Include="include\private\bitmath.h" />\r
     <ClCompile Include="stream_encoder_intrin_sse2.c" />\r
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />\r
     <ClCompile Include="window.c" />\r
+    <ClCompile Include="windows_unicode_filenames.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <CustomBuild Include="ia32\cpu_asm.nasm">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
     </CustomBuild>\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
index fa79a8d..875c021 100644 (file)
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">\r
       <Filter>Public Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\include\share\alloc.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\compat.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\endswap.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\macros.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\private.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\safe_str.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\windows_unicode_filenames.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="bitmath.c">\r
     <ClCompile Include="window.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="windows_unicode_filenames.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <CustomBuild Include="ia32\cpu_asm.nasm" />\r
index 32c80a7..42213b0 100644 (file)
                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
                        >\r
                        <File\r
-                               RelativePath=".\include\protected\all.h"\r
+                               RelativePath=".\include\private\all.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\private\all.h"\r
+                               RelativePath=".\include\protected\all.h"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\protected\stream_encoder.h"\r
+                               RelativePath=".\include\private\stream_encoder.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\include\private\stream_encoder.h"\r
+                               RelativePath=".\include\protected\stream_encoder.h"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\alloc.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\assert.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\compat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\endswap.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\export.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\macros.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\metadata.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\include\share\private.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\safe_str.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\include\FLAC\stream_decoder.h"\r
                                >\r
                        </File>\r
                                RelativePath="..\..\include\FLAC\stream_encoder.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\include\share\windows_unicode_filenames.h"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="Source Files"\r
                                RelativePath=".\window.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath=".\windows_unicode_filenames.c"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <File\r
                        RelativePath=".\ia32\cpu_asm.nasm"\r
index 8cc1902..78c03e6 100644 (file)
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />\r
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />\r
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />\r
+    <ClInclude Include="..\..\include\share\alloc.h" />\r
+    <ClInclude Include="..\..\include\share\compat.h" />\r
+    <ClInclude Include="..\..\include\share\endswap.h" />\r
+    <ClInclude Include="..\..\include\share\macros.h" />\r
+    <ClInclude Include="..\..\include\share\private.h" />\r
+    <ClInclude Include="..\..\include\share\safe_str.h" />\r
+    <ClInclude Include="..\..\include\share\windows_unicode_filenames.h" />\r
     <ClInclude Include="ia32\nasm.h" />\r
     <ClInclude Include="include\private\all.h" />\r
     <ClInclude Include="include\private\bitmath.h" />\r
     <ClCompile Include="stream_encoder_intrin_sse2.c" />\r
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />\r
     <ClCompile Include="window.c" />\r
+    <ClCompile Include="windows_unicode_filenames.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <CustomBuild Include="ia32\cpu_asm.nasm">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
     </CustomBuild>\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
index bc99bf3..a600678 100644 (file)
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">\r
       <Filter>Public Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\include\share\alloc.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\compat.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\endswap.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\macros.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\private.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\safe_str.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\include\share\windows_unicode_filenames.h">\r
+      <Filter>Public Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="bitmath.c">\r
     <ClCompile Include="window.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="windows_unicode_filenames.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <CustomBuild Include="ia32\cpu_asm.nasm" />\r
index e3355ce..5dba9b8 100644 (file)
@@ -44,12 +44,17 @@ metaflac_SOURCES = \
        utils.h
 metaflac_LDFLAGS = $(AM_LDFLAGS)
 
+if OS_IS_WINDOWS
+win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
+endif
+
 metaflac_LDADD = \
        $(top_builddir)/src/share/grabbag/libgrabbag.la \
        $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
        $(top_builddir)/src/share/getopt/libgetopt.la \
        $(top_builddir)/src/share/utf8/libutf8.la \
        $(top_builddir)/src/libFLAC/libFLAC.la \
+       $(win_utf8_lib) \
        @LIBICONV@
 
 CLEANFILES = metaflac.exe
index 7d9683a..673f1db 100644 (file)
@@ -28,12 +28,8 @@ INCLUDES = -I$(topdir)/include -I$(HOME)/local/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
        charset.c \
index ec101a3..b713f6d 100644 (file)
@@ -29,12 +29,8 @@ INCLUDES  = -I./include -I$(topdir)/include -I.. $(shell xmms-config --cflags)
 ifeq ($(OS),Darwin)
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libwin_utf8_io.a $(OGG_LIBS) -lm -lsupc++ -lz
-else
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz
 endif
-endif
 
 SRCS_C = \
        charset.c \
index 9362823..cd44ed3 100644 (file)
@@ -63,12 +63,12 @@ noinst_LTLIBRARIES = \
 if OS_IS_WINDOWS
 win_utf8_io_libwin_utf8_io_la_SOURCES =        win_utf8_io/win_utf8_io.c
 libwin_utf8_io = win_utf8_io/libwin_utf8_io.la
+win_utf8_io_libwin_utf8_io_la_LIBADD = $(top_builddir)/src/libFLAC/libFLAC.la -lm
 else
 win_utf8_io_libwin_utf8_io_la_SOURCES =
 libwin_utf8_io =
 endif
 
-
 getopt_libgetopt_la_SOURCES = getopt/getopt.c getopt/getopt1.c
 
 grabbag_libgrabbag_la_SOURCES = \
index 4eac54b..6c8ff6c 100644 (file)
@@ -1,3 +1,5 @@
+#  grabbag - Convenience lib for various routines common to several tools
+
 #
 # GNU makefile
 #
@@ -8,12 +10,8 @@ libdir = $(topdir)/objs/$(BUILD)/lib
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lreplaygain_analysis -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm
 endif
-endif
 
 LIB_NAME = libgrabbag
 INCLUDES = -I$(topdir)/include
index 8ae6a28..8e7b6fd 100644 (file)
       <Project>{4cefbc89-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index b941b07..1549266 100644 (file)
@@ -4,6 +4,12 @@
 
 topdir = ../../..
 
+ifeq ($(OS),Darwin)
+    EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
+else
+    LIBS = -lFLAC $(OGG_LIBS) -lm
+endif
+
 LIB_NAME = libwin_utf8_io
 INCLUDES = -I$(topdir)/include
 
index 6b5c56c..6cb4033 100644 (file)
@@ -103,8 +103,6 @@ static wchar_t *wchar_from_utf8(const char *str)
        return widestr;
 }
 
-static void set_filename_utf8(int b);
-
 /* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */
 int get_utf8_argv(int *argc, char ***argv)
 {
@@ -144,7 +142,7 @@ int get_utf8_argv(int *argc, char ***argv)
        FreeLibrary(handle); /* do not free it when wargv or wenv are still in use */
 
        if (ret == 0) {
-               set_filename_utf8(1);
+               flac_set_utf8_filenames(true);
                *argc = wargc;
                *argv = utf8argv;
        } else {
@@ -258,140 +256,3 @@ int vfprintf_utf8(FILE *stream, const char *format, va_list argptr)
 
        return ret;
 }
-
-/* file functions */
-
-static int utf8_filename = 0;
-
-static void set_filename_utf8(int b)
-{
-       utf8_filename = b ? 1: 0;
-}
-
-FILE *fopen_utf8(const char *filename, const char *mode)
-{
-       if (0 == utf8_filename) {
-               return fopen(filename, mode);
-       } else {
-               wchar_t *wname = NULL;
-               wchar_t *wmode = NULL;
-               FILE *f = NULL;
-
-               do {
-                       if (!(wname = wchar_from_utf8(filename))) break;
-                       if (!(wmode = wchar_from_utf8(mode))) break;
-                       f = _wfopen(wname, wmode);
-               } while(0);
-
-               free(wname);
-               free(wmode);
-
-               return f;
-       }
-}
-
-int _stat64_utf8(const char *path, struct __stat64 *buffer)
-{
-       if (0 == utf8_filename) {
-               return _stat64(path, buffer);
-       } else {
-               wchar_t *wpath;
-               int ret;
-
-               if (!(wpath = wchar_from_utf8(path))) return -1;
-               ret = _wstat64(wpath, buffer);
-               free(wpath);
-
-               return ret;
-       }
-}
-
-int chmod_utf8(const char *filename, int pmode)
-{
-       if (0 == utf8_filename) {
-               return _chmod(filename, pmode);
-       } else {
-               wchar_t *wname;
-               int ret;
-
-               if (!(wname = wchar_from_utf8(filename))) return -1;
-               ret = _wchmod(wname, pmode);
-               free(wname);
-
-               return ret;
-       }
-}
-
-int utime_utf8(const char *filename, struct utimbuf *times)
-{
-       if (0 == utf8_filename) {
-               return utime(filename, times);
-       } else {
-               wchar_t *wname;
-               struct __utimbuf64 ut;
-               int ret;
-
-               if (!(wname = wchar_from_utf8(filename))) return -1;
-               ut.actime = times->actime;
-               ut.modtime = times->modtime;
-               ret = _wutime64(wname, &ut);
-               free(wname);
-
-               return ret;
-       }
-}
-
-int unlink_utf8(const char *filename)
-{
-       if (0 == utf8_filename) {
-               return _unlink(filename);
-       } else {
-               wchar_t *wname;
-               int ret;
-
-               if (!(wname = wchar_from_utf8(filename))) return -1;
-               ret = _wunlink(wname);
-               free(wname);
-
-               return ret;
-       }
-}
-
-int rename_utf8(const char *oldname, const char *newname)
-{
-       if (0 == utf8_filename) {
-               return rename(oldname, newname);
-       } else {
-               wchar_t *wold = NULL;
-               wchar_t *wnew = NULL;
-               int ret = -1;
-
-               do {
-                       if (!(wold = wchar_from_utf8(oldname))) break;
-                       if (!(wnew = wchar_from_utf8(newname))) break;
-                       ret = _wrename(wold, wnew);
-               } while(0);
-
-               free(wold);
-               free(wnew);
-
-               return ret;
-       }
-}
-
-HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
-{
-       if (0 == utf8_filename) {
-               return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
-       } else {
-               wchar_t *wname;
-               HANDLE handle = INVALID_HANDLE_VALUE;
-
-               if ((wname = wchar_from_utf8(lpFileName)) != NULL) {
-                       handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
-                       free(wname);
-               }
-
-               return handle;
-       }
-}
index 9fe694d..5e77fea 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
        main.c
index eef8753..301fa15 100644 (file)
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 135a336..fca1619 100644 (file)
@@ -29,6 +29,7 @@ test_picture_SOURCES = \
 
 test_picture_LDADD = \
        $(top_builddir)/src/share/grabbag/libgrabbag.la \
+       $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
        $(top_builddir)/src/libFLAC/libFLAC.la
 
 CLEANFILES = test_picture.exe
index 10ebfe0..fe57b4c 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
        main.c
index 3a6da46..588c19e 100644 (file)
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 69d1a84..f520a6e 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
        decoders.cpp \
index dfa7e81..c356e62 100644 (file)
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">\r
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
index b1bab02..152b8cb 100644 (file)
@@ -26,16 +26,12 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(
 
 noinst_PROGRAMS = test_libFLAC
 
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
-
 test_libFLAC_LDADD = \
        $(top_builddir)/src/share/grabbag/libgrabbag.la \
        $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
        $(top_builddir)/src/test_libs_common/libtest_libs_common.la \
-       $(top_builddir)/src/libFLAC/libFLAC-static.la \
-       $(win_utf8_lib) @OGG_LIBS@ \
+       $(top_builddir)/src/libFLAC/libFLAC.la \
+       @OGG_LIBS@ \
        -lm
 
 test_libFLAC_SOURCES = \
index e95beb3..2e1f816 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
        bitwriter.c \
index 3151769..052c9d9 100644 (file)
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">\r
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
index 0b77388..e585e1a 100644 (file)
@@ -24,6 +24,8 @@ libtest_libs_common_la_SOURCES = \
        file_utils_flac.c \
        metadata_utils.c
 
+libtest_libs_common_LDADD = $(top_builddir)/src/libFLAC/libFLAC.la
+
 EXTRA_DIST = \
        Makefile.lite \
        README \
index abf2f1e..cb970a6 100644 (file)
@@ -28,12 +28,8 @@ LIB_NAME = libtest_libs_common
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 INCLUDES = -I$(topdir)/include
 
index 1e41c7b..812c8c3 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 5ada17d..b5fdc72 100644 (file)
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
        main.c
index 71c3cff..cc20367 100644 (file)
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>\r
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
     </ProjectReference>\r
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">\r
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>\r
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
-    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
index 1eb0759..106e7b2 100644 (file)
@@ -28,13 +28,9 @@ PROGRAM_NAME = flactimer
 INCLUDES = -I$(topdir)/include
 
 ifeq ($(OS),Darwin)
-    EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
+    EXPLICIT_LIBS = -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
-    LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
-endif
+    LIBS = -lm
 endif
 
 SRCS_CPP = \