Bugzilla bug 112987: correctly detect the FreeBSD versions in which poll()

was added to libc and libc_r.  Thanks to Jeremy Lea for pointing me at
the FreeBSD Porter's Handbook.
This commit is contained in:
wtc%netscape.com 2002-01-05 01:37:05 +00:00
Родитель 66afd62e13
Коммит ef8193051d
1 изменённых файлов: 14 добавлений и 5 удалений

Просмотреть файл

@ -37,7 +37,9 @@
#include "prthread.h"
#include <sys/param.h>
#if __FreeBSD__ >= 2
#include <osreldate.h> /* for __FreeBSD_version */
#endif
#include <sys/syscall.h>
#define PR_LINKER_ARCH "freebsd"
@ -66,16 +68,23 @@
#define _PR_HAVE_SOCKADDR_LEN
#define _PR_STAT_HAS_ST_ATIMESPEC
#define _PR_NO_LARGE_FILES
#if ( __FreeBSD_version >= 220000 ) && ( __FreeBSD_version < 400008 )
#if !defined(_PR_PTHREADS)
#if defined(_PR_PTHREADS)
#if __FreeBSD_version >= 400008
/*
* libc_r doesn't have poll(). Although libc has poll(), it is not
* thread-safe so we can't use it in the pthreads version.
* libc_r before this version of FreeBSD doesn't have poll().
* Although libc has poll(), it is not thread-safe so we can't
* use it in the pthreads version.
*/
#define _PR_POLL_AVAILABLE
#endif
#else
#if __FreeBSD_version >= 300000
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#endif
#endif
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY