[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Sunupdate (#496)

David Stes notifications at github.com
Thu Jun 11 08:09:38 UTC 2020


> 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.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/496#issuecomment-642486172
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200611/81b2b70e/attachment.html>


More information about the Vm-dev mailing list