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 776193 - Should use uint32_t instead of u_int32_t in coverage.cpp
Should use uint32_t instead of u_int32_t in coverage.cpp
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
1.44.x
Other Solaris
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-17 06:03 UTC by Alan Coopersmith
Modified: 2016-12-18 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch currently used in Solaris builds (1.30 KB, patch)
2016-12-17 06:08 UTC, Alan Coopersmith
committed Details | Review

Description Alan Coopersmith 2016-12-17 06:03:52 UTC
gjs mostly uses the portable, C99 standard uint32_t type.

However, one place in coverage.cpp, u_int32_t is used, which works on Linux,
but causes build failures on Solaris:

gjs-1.43.3/gjs/coverage.cpp: In function 'gboolean get_array_from_js_value(JSContext*, jsval*, std::size_t, GDestroyNotify, ConvertAndInsertJSVal, GArray**)':
gjs-1.43.3/gjs/coverage.cpp:488:5: error: 'u_int32_t' was not declared in this scope
     u_int32_t js_array_len;
     ^
gjs-1.43.3/gjs/coverage.cpp:493:47: error: 'js_array_len' was not declared in this scope
     if (JS_GetArrayLength(context, js_array, &js_array_len)) {
                                               ^
gjs-1.43.3/gjs/coverage.cpp:494:19: error: expected ';' before 'i'
         u_int32_t i = 0;
                   ^
gjs-1.43.3/gjs/coverage.cpp:495:16: error: 'i' was not declared in this scope
         for (; i < js_array_len; ++i) {
                ^
Comment 1 Alan Coopersmith 2016-12-17 06:08:02 UTC
Created attachment 342102 [details] [review]
Patch currently used in Solaris builds
Comment 2 Philip Chimento 2016-12-18 05:41:04 UTC
Review of attachment 342102 [details] [review]:

Looks good, thanks for the patch!