-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hello,
There's two updates for the SunOS port here.
- - Change #define sk_GENERAL_NAME_freefunc for SunPRO C compiler - - SunOS: add a note in HowToBuild on pkg-config
The first change is for the OpenSSL SqueakSSL case of openssl 1.0.2, to fix a type cast ... I think this potentially impacts all openssl 1.0.2 platforms that use --disable-dynamicopenssl but it seems OK (I think/hope).
For the second change this is a "documentation" update to the HowToBuild "HOWTO" documentation in the build.sunos directory; this has no further impact.
Thanks, David Stes
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496
-- Commit Summary --
* Merge pull request #4 from OpenSmalltalk/Cog * Merge pull request #5 from OpenSmalltalk/Cog * SunOS: add a note in HowToBuild on pkg-config * Change #define sk_GENERAL_NAME_freefunc for SunPRO C compiler
-- File Changes --
M build.sunos64x64/HowToBuild (10) M platforms/unix/plugins/SqueakSSL/openssl_overlay.h (2)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496.diff
@cstes pushed 1 commit.
a939b401e02d61d8c76f8113497d6c3c91c70018 SunOS: add doc on pfexec squeak (proc_priocntl)
@cstes pushed 1 commit.
be4cadff3a664dde4054e174db3418adfcd8c09b SunOS: doc on /etc/user_attr Squeak profile
@cstes pushed 1 commit.
464467e265412359dee56cdf4f1d9dc4f6c5866a SunOS: clarify in HowToBuild audio header files
@cstes pushed 1 commit.
70d068dd12191a70b1a7a495a4c6bef39ff9a4ba Remove wikipedia reference to Solaris
@cstes pushed 1 commit.
dcdd632efcb63e2d55f66232aa25856796dc6b76 Change sk_GENERAL_NAME_freefunc void* to GENERAL_NAME*
Why? I don't think that the freefunc is declared as such in the old openssl version.
with the definition -#define sk_GENERAL_NAME_freefunc void(*)(void*)
the compile aborts with the SunPro C compiler.
platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc", line 122: operands have incompatible types: pointer to function(pointer to void) returning void ":" pointer to function(pointer to struct GENERAL_NAME_st {int type, union {..} d}) returning void
With the definition +#define sk_GENERAL_NAME_freefunc void(*)(GENERAL_NAME*)
compilation works.
The code
sqo_sk_GENERAL_NAME_pop_free(sANs, (sk_GENERAL_NAME_freefunc)sqo_sk_free);
expanded - with the old defintion of sk_GENERAL_NAME_freefunc - to:
sk_pop_free ( ( ( _STACK * ) ( 1 ? ( sANs ) : ( struct stack_st_GENERAL_NAME * ) 0 ) ) , ( ( void ( * ) ( void * ) ) ( ( 1 ? ( ( void ( * ) ( void * ) ) sk_free ) : ( void ( * ) ( GENERAL_NAME * ) ) 0 ) ) ) );
with the new definition of sk_GENERAL_NAME_freefunc it expands to :
sk_pop_free ( ( ( _STACK * ) ( 1 ? ( sANs ) : ( struct stack_st_GENERAL_NAME * ) 0 ) ) , ( ( void ( * ) ( void * ) ) ( ( 1 ? ( ( void ( * ) ( GENERAL_NAME * ) ) sk_free ) : ( void ( * ) ( GENERAL_NAME * ) ) 0 ) ) ) );
which the SUNpro compiler accepts.
@cstes Can you have a look at the defined `OPENSSL_VERSION_NUMBER`? The definition to `void*` is necessary in earlier versions of OpenSSL, only later versions have the stacks typed.
The header opensslv.h has a definition # define OPENSSL_VERSION_NUMBER 0x100020ffL That header is included by crypto.h.
In my case I observed that I had to change
--- a/platforms/unix/plugins/SqueakSSL/openssl_overlay.h +++ b/platforms/unix/plugins/SqueakSSL/openssl_overlay.h @@ -164,7 +164,7 @@ #define sqo_SSL_library_init SSL_library_init #define sqo_SSL_load_error_strings SSL_load_error_strings
-#define sk_GENERAL_NAME_freefunc void(*)(void*) +#define sk_GENERAL_NAME_freefunc void(*)(GENERAL_NAME*)
Then it is strange this did not come up earlier 😕
Then it is strange this did not come up earlier 😕
I don't have the issue with "gcc" or with "clang". Only with the SunPro C compiler. Technically speaking I find it interesting to compile with the SunPro C compiler although that I can use gcc as an alternative. By the way, the "alternative" that I also have is to patch the source before compilation, which is also fine by me, then I patch it for the SunPro C specific case. However I submit the issue "upstream" so to speak to see what you think of it, maybe another solution exists. I think the change from point to void to point to GENERAL_NAME looked fine to me, by the way that fix also works for me in the gcc and clang cases.
yeah, you might be right… I'm only afraid it might break openssl 0.9.9, but nobody should use that anyway¬ lets keep it
@cstes pushed 1 commit.
dadd2d2f3ee7754a92771735bb5cae599a5d7ccf Add comment about Basic Solaris User profile and pthread_setschedparam
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
This is a reminder about https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496
Currently I apply manually this small patch before building the OpenSmalltalk VM on Solaris 11.
My understanding from the feedback so far "let's keep it", this means that it is (hopefully) acceptable to merge it into Cog.
That would be useful as I don't have to manually apply the patch any longer.
It's not a disaster if it cannot be merged into Cog for some reason, as I can continue to just apply the patch of course, but I'm submitting the patch with the hope that it can be integrated !
Thanks, David Stes
Reminder about this patch submitted a few months ago :
Change void * to GENERAL_NAME* in :
-#define sk_GENERAL_NAME_freefunc void()(void) +#define sk_GENERAL_NAME_freefunc void()(GENERAL_NAME)
thanks. sorry…
Merged #496 into Cog.
vm-dev@lists.squeakfoundation.org