Use unnamed semaphore of Grand Central Dispatch for macOS.
* configure.ac [*-apple-darwin*]: Search dispatch_semaphore_create and define HAVE_LIB_DISPATCH if found. * src/npth.c [HAVE_LIB_DISPATCH] (sem_init, sem_post, sem_wait): New. * src/npth.c (try_sem_open): Remove. * tests/t-fork.c: Add comments.
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>