dup3: Fix behavior for equal file descriptors on Haiku. * lib/dup3.c (dup3) [__HAIKU__]: Set errno to EINVAL and return -1 if both file descriptors are equal. * doc/posix-functions/dup3.texi: Document the Haiku bug.