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 763466 - Constructors on HP-UX/PA, HP-UX/IA
Constructors on HP-UX/PA, HP-UX/IA
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: general
2.46.x
Other HP-UX
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-03-10 17:10 UTC by The Written Word
Modified: 2018-05-24 18:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Constructor patch for HP-UX/PA, HP-UX/IA (2.53 KB, patch)
2016-03-10 17:10 UTC, The Written Word
none Details | Review

Description The Written Word 2016-03-10 17:10:59 UTC
Created attachment 323653 [details] [review]
Constructor patch for HP-UX/PA, HP-UX/IA

I have a build of glib-2.46.2 on HP-UX/PA and HP-UX/IA that has constructors working. Getting it to work on HP-UX/PA wasn't too difficult but HP-UX/IA was a bit more involved.

Support for constructors currently requires the help of the preprocessor, using glib/gconstructor.h. This works ok on HP-UX/PA but not HP-UX/IA. According to the HP-UX/IA compiler documentation:
  The #pragma directive is ignored by the preprocessor, and instead
  is passed on to the HP aC++ compiler.

So, on HP-UX/IA, G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS cannot work because the HP-UX C compiler passes the raw string to #pragma. Is there a cleaner solution than adding something like?
  #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
  #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor)
 +#elif defined(__hpux) && defined(__ia64)
 +#pragma INIT "glib_init_ctor"
  #endif
Comment 1 GNOME Infrastructure Team 2018-05-24 18:38:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1143.