After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631102 - GLib 2.26.x-Fixes and enhancements to the project files under MSVC 2008
GLib 2.26.x-Fixes and enhancements to the project files under MSVC 2008
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.26.x
Other Windows
: Normal major
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on: 635093
Blocks:
 
 
Reported: 2010-10-01 14:25 UTC by Fan, Chun-wei
Modified: 2010-11-30 02:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Diff for the fixes and a glib-mkenums file for use (8.66 KB, application/zip)
2010-10-01 14:25 UTC, Fan, Chun-wei
  Details
Updated diff files and glib-mkenums for GLib 2.26.x (8.72 KB, application/zip)
2010-10-01 15:13 UTC, Fan, Chun-wei
  Details
Updates to the Project files (39.76 KB, patch)
2010-11-17 17:21 UTC, Fan, Chun-wei
none Details | Review
Update glib.vcproj and gio.vcproj (18.29 KB, patch)
2010-11-17 17:23 UTC, Fan, Chun-wei
none Details | Review
Updates to build\win32\vs9\Readme.txt (2.41 KB, patch)
2010-11-22 05:47 UTC, Fan, Chun-wei
none Details | Review

Description Fan, Chun-wei 2010-10-01 14:25:35 UTC
Created attachment 171494 [details]
Diff for the fixes and a glib-mkenums file for use

Hello,

It seems that the project files and the source files need to be updated to be able to be compiled in MSVC 2008 (and most probably other C89 compilers).  I have attached a zip file containing the diff for the changes, plus a glib-mkenums script file for use.  The summary of the changes by the diff files is as follows:

1. Changed C99-style declarations in gio/gdbusmessage.c, gio/gregistrysettingsbackend.c

2. Moved check for the G_OS_WIN32 macro after the inclusion of GLib headers in glib/gdatetime.c, glib/gmessages.c, glib/gscanner.c

3.Wrap #ifdef HAVE_SYS_TIME_H/#endif around #include <sys/time.h> in glib/gtimer.c

4.Wrap #ifndef G_DISABLE_DEPRECATED/#endif around static void
 relation_test (void) and g_test_add_func ("/testglib/Relation", relation_test); in tests/testglib.c, as that function is being deprecated from the API

5.Made up for missing sources in the build/win32/vs9/gio.vcproj: gio\gregistrysettingsbackend.c, gio\gwin32appinfo.c, gio\win32\gwin32directorymonitor.c, gio\win32\gwinhttpfile.c, gio\win32\gwinhttpfileinputstream.c, gio\win32\gwinhttpfileoutputstream.c, gio\win32\gwinhttpvfs.c

6.Removed the PCRE sources and compilation macros from build/win32/vs9/glib.vcproj and in turn made it deoend on a pre-compiled PCRE.  This is due to the change in its source layout in GLib and it should be not too difficult to compile PCRE with MSVC due to the use of CMAKE-it seems the PCRE sources update quite frequently

7.Updated build/win32/vs9/glib.vsprops for creating glibconfig.h as it is now in glib/, and the copy of gobject/glib-mkenums, glib\gdatetime.h, glib\gtimezone.h, gio\gregistrysettingsbackend.h, gio\gwin32appinfo.h, gio\gwin32inputstream.h, gio\gwin32mount.h, gio\gwin32outputstream.h, gio\gwin32resolver.h, gio\gwin32volumemonitor.h, gio\win32\gwin32directorymonitor.h, gio\win32\gwinhttpfile.h, gio\win32\gwinhttpfileinputstream.h, gio\win32\gwinhttpfileoutputstream.h, gio\win32\gwinhttpvfs.h, gio\win32\winhttp.h.  Also reflected the change of location of glibconfig.h (now in glib/) and removed the copying of gio\gapplication.h as it no longer exists.
Comment 1 Fan, Chun-wei 2010-10-01 15:13:29 UTC
Created attachment 171499 [details]
Updated diff files and glib-mkenums for GLib 2.26.x

Sorry, seems there are further admendments to build/win32/vs9/glib.vsprops...
Added copy of the required headers of GIO:
gio\gproxy.h
gio\gproxyaddress.h
gio\gproxyaddressenumerator.h
gio\gproxyconnection.h
gio\gproxyresolver.h
gio\gsettings.h
gio\gsimplepermission.h
Comment 2 Fan, Chun-wei 2010-11-17 17:21:07 UTC
Created attachment 174699 [details] [review]
Updates to the Project files

I have split my proposed patch for this into 3 parts, where: 

(1)glib.sln, glib.vsprops and glib/gio project templates (.vcprojin) and gmodule.vcproj (the patch that is attached in this comment).

(2)glib/gio.vcproj for those that are impatient for the next GLib 2.26.x release and do not want to expand their own .vcproj files from the templates nor use autofoo to generate them.

(3) Update to the sources to fix platform checks for various source files and C99-style variable declarations.

I will only post here (1) and (2) in this bug report post, ((3) I will post in a seperate bug report post).  Please let me know of any comments and please inform me whether it is okay to commit (1) here.  Thanks.
Comment 3 Fan, Chun-wei 2010-11-17 17:23:47 UTC
Created attachment 174701 [details] [review]
Update glib.vcproj and gio.vcproj

This is the patch to glib.vcproj and gio.vcproj for people who wish to apply immediately to the 2.26.x tarball release instead of expanding from the .vcprojin files.  (This patch here is not meant for commiting to git)
Comment 4 Fan, Chun-wei 2010-11-17 17:36:39 UTC
Sorry, I forgot to mention that the glib.sln and glib.vcproj(in) now contain a $(BuildType)_ExtPCRE configuration that allows people to use their own existing installation of PCRE instead of using the GLib-bundled version, which I believe is also an option on autotools-based builds.

By the way, People can still continue to use the GLib-bundled PCRE by selecting $(BuildType) (without the _ExtPCRE suffix).

I will also update the README file in the build\win32\vs9 soon regarding this part.
Comment 5 Fan, Chun-wei 2010-11-22 05:47:50 UTC
Created attachment 175007 [details] [review]
Updates to build\win32\vs9\Readme.txt

This updates the README.txt so that one can get zlib and optionally PCRE to complete the MSVC 2008 build
Comment 6 Fan, Chun-wei 2010-11-30 02:39:09 UTC
Committed after confirming with Tor.  Thanks.