The SDK:clib2/include/dlfcn.h file is for clib2 and is incompatible with the newlib libdl.so (while the function prototypes are the same the RTLD_#? constants have different values).
I would also not recommend using shared objects with clib2 as it will likely cause confusion as clib2 shared objects will not be compatible with newlib ones and vice versa.
@AmigaBlitter It worked in a sense that you could compile SDL2, but it could lead to problems if you were to compile a program, that uses SDL functions to load SObjs. Fortunately not many I know does this.
This is just like television, only you can see much further.
Regarding (window) event handling...with SDL2 we can have multiple windows. There is SDL_PumpEvents() which should update events from video subsystem but it targets the whole subsystem, as far as I understand, and not a specific window.
So I guess we will loop the video device's window list and handle the pending events per window, whenever SDL_PumpEvents() gets called, or does anyone have different ideas?
Fullscreen is tricky. I tried to avoid poking SDL_video.c but finally I had to modify CREATE_FLAGS macro to include fullscreen bit during window creation.
Otherwise SDL2 will try to change window mode to fullscreen after its creation. So this hack prevents unnecessary closing and reopening the window.
If the switching to fullscreen happens after the window creation, then something like this is probably necessary. BTW, I noticed that you re-added the memory pool semaphore from SDL1. This is a remnant from the OS3 port and no longer necessary, since MEMF_SHARED pools are protected against concurrent access: http://wiki.amigaos.net/wiki/Exec_Memory_Pools#Concurrent_Access
This is just like television, only you can see much further.
It's the ASOPOOL_Protected tag that is used to specify if a pool should be protected though. The MEMF_SHARED constant is just for specifying the type of memory that is allocated.