How do we choose between bsdsocket.library's functions and newlib's? Given that most of the functions are the same, how do we tell the compiler to choose one over the other?
I've got some networking code, but currently can't even tell whether it's via newlib or bsdsocket.library. It matters which one, because AmiSSL can only be used with file descriptors from bsdsocket.library.
Hans
If you are coding on AmigaOS4 and don't require backwards compatabilty the easiest solution is to use the interface.
ie
definetly bsdsocket
ISocket->connect()
Otherwise it's being careful about how you order your includes.
Just adding
#include <proto/bsdsocket.h>
Should be enough in most cases as that wil pull in the inlines and those will replace the functions call with macros referenceing ISocket or SocketBase depending on the target (AmigaOS4 or 68k).
It's little easier to be certain with clib2 as there is a separate libnet.a so not linking against that will give erreors if you messed up your inlcudes.
Thanks.
This code needs to be cross-platform, so I'll try the second option.
Hans
Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work