Daiki Ueno commented on a discussion on tests/pkcs11/pkcs11-mock4.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2014#note_2736063807 > + > +#ifdef __sun > +#pragma fini(mock_deinit) > +#pragma init(mock_init) > +#define _CONSTRUCTOR > +#define _DESTRUCTOR > +#else > +#define _CONSTRUCTOR __attribute__((constructor)) > +#define _DESTRUCTOR __attribute__((destructor)) > +#endif > + > +static CK_RV override_C_Initialize(void *args) > +{ > + CK_C_INITIALIZE_ARGS *init_args = args; > + > + if (init_args->flags & CKF_OS_LOCKING_OK) The function (`override_C_Initialize`) is called only once, while the module's C_Initialize is called twice: one is not overridden with this, and the other is. -- Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2014#note_2736063807 You're receiving this email because of your account on gitlab.com.
_______________________________________________ Gnutls-devel mailing list Gnutls-devel@lists.gnutls.org http://lists.gnupg.org/mailman/listinfo/gnutls-devel