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 739001 - Fix Build of broadwayd on Visual Studio
Fix Build of broadwayd on Visual Studio
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Broadway
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-10-22 11:58 UTC by Fan, Chun-wei
Modified: 2014-10-23 01:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk/broadway/toarray.pl: Make MSVC Happy with the Generated Code as well (1.55 KB, patch)
2014-10-22 12:05 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2014-10-22 11:58:35 UTC
Hi,

The build of broadway-server.c relies on two generated header files, broadwayjs.h and clienthtml.h, which are generated using the PERL script toarray.pl.  As the javascript files became bigger as development progressed, the current script creates a huge string composing of many \x-escaped characters, which is beyond the 65536 character limit permitted in a string literal, which would then break the build on Visual Studio (due to a compiler limit).

I will attach a patch to make the script emitting the string into an array of characters, not unlike what GResource does, so that worries about hitting the limit could be avoided.
Comment 1 Fan, Chun-wei 2014-10-22 12:05:35 UTC
Created attachment 289121 [details] [review]
gdk/broadway/toarray.pl: Make MSVC Happy with the Generated Code as well

Hi,

This is my patch for toarray.pl, so that the generated headers can also compile under Visual Studio, by using an array of hex characters.

This patch would be needed for master, gtk-3-14 and gtk-3-12 (if we are still supporting that branch though).

With blessings, thank you!
Comment 2 Matthias Clasen 2014-10-22 20:40:55 UTC
Review of attachment 289121 [details] [review]:

looks ok to me
Comment 3 Fan, Chun-wei 2014-10-23 01:17:26 UTC
Review of attachment 289121 [details] [review]:

Hello Matthias,

Thanks for the review, the patch was pushed as

master: 35486e79
gtk-3-14: ea8a2815
gtk-3-12: 62e731b6

With blessings, thank you!