Using ext#bind means to have two interfaces for ‘bind’: one in C and one in
ATS.
In this case, these two interfaces are incompatible. Using "mac#bind’ is
the right way to go.
Usually, you want to do something like
fun bind (…): … = “mac#mybind”
where ‘mybind’ is defined as a macro in C:
#define mybind(…) bind(…)
In this way, you can suppress warnings from gcc due to a call to ‘bind’.
The socket stuff is at a very low-level. For serious socket programming,
you can try: