diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-12-15 03:16:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-12-15 03:16:24 +0000 |
commit | ef5f752a4ae818d9c739a064410a02fa48a477e3 (patch) | |
tree | 851d8d51f2ded28ce9f366922dca52a676de31eb | |
parent | c2bcb3a286f22ed4f0f55da2a3eb2bff17906fb1 (diff) | |
download | samba-ef5f752a4ae818d9c739a064410a02fa48a477e3.tar.gz samba-ef5f752a4ae818d9c739a064410a02fa48a477e3.tar.xz samba-ef5f752a4ae818d9c739a064410a02fa48a477e3.zip |
on Linux force fcntl/mmap based shared memory and on other systems
force IPC/shmem based shared memory.
-rw-r--r-- | source/include/includes.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 <sys/types.h> #ifdef TIME_WITH_SYS_TIME |