diff options
author | James Peach <jpeach@samba.org> | 2006-05-05 05:39:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:46 -0500 |
commit | 584ac985ec203f171367dec336ab8c828e31a442 (patch) | |
tree | 13855f12705ff0c8b7c9b48888bd873c45f64aed /source3/tdb | |
parent | 78359305491f869af13622153bdf21cdb0cc2459 (diff) | |
download | samba-584ac985ec203f171367dec336ab8c828e31a442.tar.gz samba-584ac985ec203f171367dec336ab8c828e31a442.tar.bz2 samba-584ac985ec203f171367dec336ab8c828e31a442.zip |
r15448: New autoconf macro to test for sysconf variables.
(This used to be commit a19d4f2bb4aa94ab40e371efbad9f17e38e3bbc4)
Diffstat (limited to 'source3/tdb')
-rw-r--r-- | source3/tdb/spinlock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/tdb/spinlock.c b/source3/tdb/spinlock.c index a487ee2a10..e6abb3a0bc 100644 --- a/source3/tdb/spinlock.c +++ b/source3/tdb/spinlock.c @@ -268,8 +268,16 @@ static void yield_cpu(void) static int this_is_smp(void) { -#if defined(HAVE_SYSCONF) && defined(SYSCONF_SC_NPROC_ONLN) +#if defined(HAVE_SYSCONF) + +#if defined(SYSCONF_SC_NPROC_ONLN) return (sysconf(_SC_NPROC_ONLN) > 1) ? 1 : 0; +#elif defined(SYSCONF_SC_NPROCESSORS_ONLN) + return (sysconf(_SC_NPROCESSORS_ONLN) > 1) ? 1 : 0; +#else + return 0; +#endif + #else return 0; #endif |