Port to 2.4.2

Hi,
 this is a working port to the 2.4.2 version (just run make after configured your new 2.4.2 environment)

NOTE: probably we are still missing free/delete calls