From ef5f752a4ae818d9c739a064410a02fa48a477e3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Dec 1998 03:16:24 +0000 Subject: [PATCH 1/1] on Linux force fcntl/mmap based shared memory and on other systems force IPC/shmem based shared memory. --- source/include/includes.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/include/includes.h b/source/include/includes.h index 58c6ee01bdc..824a5bde5db 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -46,6 +46,19 @@ #endif +/* if we have both SYSV IPC and shared mmap then we need to choose. For most + systems it is much faster to use SYSV IPC, but under Linux it is + about 5 times faster to use fcntl, so for Linux systems we force + fcntl based locking */ +#if (defined(HAVE_SYSV_IPC) && defined(HAVE_SHARED_MMAP)) +# ifdef LINUX +# undef HAVE_SYSV_IPC +# else +# undef HAVE_SHARED_MMAP +# endif +#endif + + #include #ifdef TIME_WITH_SYS_TIME -- 2.34.1