Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
1. Proposed title of this feature request
Backport the G_SOURCE_FUNC macro from glib 2.58
3. What is the nature and description of the request?
Customer would like the G_SOURCE_FUNC macro from glib 2.58 backported or glib2 rebased.
4. Why does the customer need this? (List the business requirements here)
Customer's software takes advantage of this macro.
5. How would the customer like to achieve this? (List the functional requirements here)
The G_SOURCE_FUNC macro, as defined in glib 2.58, should be present in the glib2 library.
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
We can test presence with something like #ifdef G_SOURCE_FUNC, and then the macro's output would need to be validated. Stealing unit tests from glib 2.58, if available, may be workable here.
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?
None existing.
8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
Ideal timeframe for customer would be RHEL 8.5.
9. Is the sales team involved in this request and do they have any additional input?
Sales is not involved.
10. List any affected packages or components.
glib2
11. Would the customer be able to assist in testing this functionality if implemented?
Yes.
Comment 3Michael Catanzaro
2021-07-28 22:27:25 UTC
So this request is pretty easy to fulfill, although like any engineering request it requires developer and QA time, and there's not enough of that remaining for 8.5, so it would need to be for 8.6 if we were to accept it. That said, it's an odd request because this macro does basically nothing. It's only used to suppress -Wcast-function-type warnings. So the usual solutions would be to just not use it. E.g.:
- item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+ item->update_properties_timeout = g_timeout_add (10, update_all_properties, item);
The worst that could happen is a -Wcast-function-type warning. If you want to avoid that warning, you could simply build with -Wno-cast-function-type. Or you could do the cast manually:
- item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+ item->update_properties_timeout = g_timeout_add (10, ((GSourceFunc) (void (*)(void))update_all_properties, item);
Although I haven't tested it, I suspect a much simpler cast would work just fine:
- item->update_properties_timeout = g_timeout_add (10, G_SOURCE_FUNC (update_all_properties), item);
+ item->update_properties_timeout = g_timeout_add (10, ((GSourceFunc)(gpointer)update_all_properties, item);
Or you could define it in your code:
#ifndef G_SOURCE_FUNC
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
#endif
All of these workarounds are extremely easy, so I'm hesitant to ack this one.
Comment 4Michael Catanzaro
2021-08-17 14:12:38 UTC
I'm going to nak this one for RHEL 8. The new API will be available in RHEL 9 though.
Comment 5RHEL Program Management
2021-08-17 14:12:47 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.