VS support updates

-Fix GLib project/filter files generation as some source items are under
 the "deprecated" subfolder, and filter out the gthread-*.c
-Explicitly specify gthread-win32.c in the GLib project/filter file
 templates, since tarballs are done on Linux.
-Don't define g_static_mutex_get_mutex in the pregenerated
 glibconfig.h.win32(.in) as it is defined in deprecated/gthread.h for Windows
This commit is contained in:
Chun-wei Fan
2011-09-23 10:41:19 +08:00
parent 9de564bf1f
commit b2717740a2
5 changed files with 20 additions and 75 deletions

View File

@@ -31,6 +31,9 @@
<ClCompile Include="..\..\..\glib\gspawn-win32.c"> <ClCompile Include="..\..\..\glib\gspawn-win32.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\glib\gthread-win32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gwin32.c"> <ClCompile Include="..\..\..\glib\gwin32.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

View File

@@ -334,6 +334,7 @@
#include "libglib.vs10.sourcefiles" #include "libglib.vs10.sourcefiles"
<ClCompile Include="..\..\..\glib\giowin32.c" /> <ClCompile Include="..\..\..\glib\giowin32.c" />
<ClCompile Include="..\..\..\glib\gspawn-win32.c" /> <ClCompile Include="..\..\..\glib\gspawn-win32.c" />
<ClCompile Include="..\..\..\glib\gthread-win32.c" />
<ClCompile Include="..\..\..\glib\gwin32.c" /> <ClCompile Include="..\..\..\glib\gwin32.c" />
<ClCompile Include="..\..\..\glib\libcharset\localcharset.c"> <ClCompile Include="..\..\..\glib\libcharset\localcharset.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">LIBDIR=/irrelevant/lib;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">LIBDIR=/irrelevant/lib;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@@ -291,77 +291,20 @@
#include "libglib.sourcefiles" #include "libglib.sourcefiles"
<File RelativePath="..\..\..\glib\giowin32.c" /> <File RelativePath="..\..\..\glib\giowin32.c" />
<File RelativePath="..\..\..\glib\gspawn-win32.c" /> <File RelativePath="..\..\..\glib\gspawn-win32.c" />
<File RelativePath="..\..\..\glib\gthread-win32.c" />
<File RelativePath="..\..\..\glib\gwin32.c" /> <File RelativePath="..\..\..\glib\gwin32.c" />
<Filter <Filter
Name="libcharset" Name="libcharset"
> >
<File <File RelativePath="..\..\..\glib\libcharset\localcharset.c">
RelativePath="..\..\..\glib\libcharset\localcharset.c" <FileConfiguration Name="Debug|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
> <FileConfiguration Name="Debug_ExtPCRE|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
<FileConfiguration <FileConfiguration Name="Debug|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
Name="Debug|Win32" <FileConfiguration Name="Debug_ExtPCRE|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
> <FileConfiguration Name="Release|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
<Tool <FileConfiguration Name="Release_ExtPCRE|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
Name="VCCLCompilerTool" <FileConfiguration Name="Release|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;" <FileConfiguration Name="Release_ExtPCRE|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"/></FileConfiguration>
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_ExtPCRE|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_ExtPCRE|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_ExtPCRE|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_ExtPCRE|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="LIBDIR=&quot;/irrelevant/lib&quot;"
/>
</FileConfiguration>
</File> </File>
</Filter> </Filter>
<Filter <Filter

View File

@@ -459,9 +459,9 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs1
cp $$d/$$f $(distdir) || exit 1; done cp $$d/$$f $(distdir) || exit 1; done
../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
for F in $(libglib_2_0_la_SOURCES); do \ for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \ case $$F in \
*-gcc.c|*-unix.c) \ *-unix.c|gthread-*.c) \
;; \ ;; \
*.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \ *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
;; \ ;; \
@@ -471,9 +471,9 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs1
rm libglib.sourcefiles rm libglib.sourcefiles
../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
for F in $(libglib_2_0_la_SOURCES); do \ for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \ case $$F in \
*-gcc.c|*-unix.c) \ *-unix.c|gthread-*.c) \
;; \ ;; \
*.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \ *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
;; \ ;; \
@@ -483,9 +483,9 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs1
rm libglib.vs10.sourcefiles rm libglib.vs10.sourcefiles
../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
for F in $(libglib_2_0_la_SOURCES); do \ for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \ case $$F in \
*-gcc.c|*-unix.c) \ *-unix.c|gthread-*.c) \
;; \ ;; \
*.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \ *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
;; \ ;; \

View File

@@ -208,8 +208,6 @@ typedef unsigned __int64 guintptr;
#define G_THREADS_IMPL_WIN32 #define G_THREADS_IMPL_WIN32
typedef struct _GMutex* GStaticMutex; typedef struct _GMutex* GStaticMutex;
#define G_STATIC_MUTEX_INIT NULL #define G_STATIC_MUTEX_INIT NULL
#define g_static_mutex_get_mutex(mutex) \
(g_static_mutex_get_mutex_impl_shortcut (mutex))
/* This represents a system thread as used by the implementation. An /* This represents a system thread as used by the implementation. An
* alien implementaion, as loaded by g_thread_init can only count on * alien implementaion, as loaded by g_thread_init can only count on
* "sizeof (gpointer)" bytes to store their info. We however need more * "sizeof (gpointer)" bytes to store their info. We however need more