Hi Collin,

> Perhaps test-sys_un{.c,cc} like usual
> and another test program for UNIX socket functionality if <sys/un.h> or
> <afunix.h> is found.

Yes.

> I'm thinking that for older versions of Windows and systems without UNIX
> sockets they should all be skipped.
> 
> I don't think there is much point in defining 'struct sockaddr_un' if
> AF_UNIX is not supported. Maybe the tests should all be like:
> 
> #if HAVE_UNIXSOCKET
> int
> main ()
> {
>   /* Do test.  */
> }
> #else
> int
> main
> {
>   /* Skip test.  */
>   exit (77);
> }
> #endif

Yes, I agree with all this. That's how we write unit tests.

Bruno




Reply via email to