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 660761 - Allow builder to specify alternate extension for modules
Allow builder to specify alternate extension for modules
Status: RESOLVED DUPLICATE of bug 671212
Product: glib
Classification: Platform
Component: gmodule
2.30.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-03 08:18 UTC by Kean Johnston
Modified: 2018-02-15 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Give builder opportunity to change DLL extension (3.30 KB, patch)
2011-10-03 08:18 UTC, Kean Johnston
none Details | Review
Replacement patch not sentitive to string length (3.39 KB, patch)
2011-10-03 14:58 UTC, Kean Johnston
none Details | Review
Deal with prefixes and suffixes, for allplatforms (11.50 KB, patch)
2011-10-06 17:48 UTC, Kean Johnston
none Details | Review

Description Kean Johnston 2011-10-03 08:18:58 UTC
Created attachment 198061 [details] [review]
Give builder opportunity to change DLL extension

There are a few places where the extension of ".dll" is hard-coded. While it is true that this is most often the right name, there are circumstances where it is useful for the person compiling GLib to be able to use something else. For example, when compiling both 32-bit and 64-bit versions to sit side by side it is useful to have 32-bit extensions have one suffix (say, .x32) and 64-bit versions to have another (say, .x64). The attached patch provides the person compiling GLib with just that flexibility, and doesn't change any defaults.
Comment 1 Morten Welinder 2011-10-03 13:30:20 UTC
From the looks of it, this will only word if GMODULE_WIN32_EXTENSION
is a 4-character string, probably starting with a dot.  At the very
least that restriction should be documented.
Comment 2 Kean Johnston 2011-10-03 14:58:15 UTC
Created attachment 198104 [details] [review]
Replacement patch not sentitive to string length
Comment 3 Kean Johnston 2011-10-03 14:59:53 UTC
Created a new patch that isn't sensitive to the replacement length. No reason it has to start with a period OR be exactly 4 characters long, although in practice almost anyone wanting to use this would make sure both of those were true. But the new patch is less sensitive to people being silly.
Comment 4 Paolo Borelli 2011-10-03 19:54:59 UTC
a grep show that gio-querymodules needs the same fix... this should ideally be defined in a private header, maybe even config.h instead of duplicated everywhere.

Maybe you can define both prefix and suffix on all platforms (prefix would be empty on windows) and get rid of the ifdefs in the actual code.
Comment 5 Kean Johnston 2011-10-06 17:47:51 UTC
Heh ... in a fit of synchronicity I didn't even notice your comment about doing a prefix as well, and did it anyway. New patch attached.
Comment 6 Kean Johnston 2011-10-06 17:48:47 UTC
Created attachment 198455 [details] [review]
Deal with prefixes and suffixes, for allplatforms
Comment 7 Philip Withnall 2018-02-15 14:55:41 UTC
I think this would best be fixed by allowing the user to specify some flags about how the module they are trying to load is named, rather than hard-coding more platform-specific prefixes/suffixes.

⇒ Bug #671212

*** This bug has been marked as a duplicate of bug 671212 ***