GNOME Bugzilla – Bug 763466
Constructors on HP-UX/PA, HP-UX/IA
Last modified: 2018-05-24 18:38:05 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
-- 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.