From: drh Date: Tue, 1 Jun 2010 00:03:57 +0000 (+0000) Subject: Fix os_unix.c so that it will compile and build on a Mac. X-Git-Tag: version-3.7.2~328^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b29ad8502e626a97a5b9b0fbdc5c634514db8f47;p=thirdparty%2Fsqlite.git Fix os_unix.c so that it will compile and build on a Mac. FossilOrigin-Name: bc707c83e5f9849d9d201d695d0d071ca9ed93cb --- diff --git a/manifest b/manifest index 7e0cdb20dd..ed549d9da6 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -C Fix\sissues\swith\slocking_mode=EXCLUSIVE\sin\sWAL. -D 2010-05-31T20:28:38 +C Fix\sos_unix.c\sso\sthat\sit\swill\scompile\sand\sbuild\son\sa\sMac. +D 2010-06-01T00:03:57 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -155,7 +152,7 @@ F src/os.c 1516984144e26734f97748f891f1a04f9e294c2e F src/os.h 6f604986f0ef0ca288c2330b16051ff70b431e8c F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f F src/os_os2.c 665876d5eec7585226b0a1cf5e18098de2b2da19 -F src/os_unix.c 129e60ccca3abe59ca4374e28138c540c1069a09 +F src/os_unix.c fe672ba65f15599b2940fd65613df59ce657ad3b F src/os_win.c f815403c51a2adad30244374c801dd7fd2734567 F src/pager.c acbef227bf158776449907c275c5d9332e4e52f9 F src/pager.h 76466c3a5af56943537f68b1f16567101a0cd1d0 @@ -818,14 +815,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P a16fde190183d1ae252d1aa305b23fdb88c603dc -R 7ca4bba7f34b45ef2eb156ca8f31e257 +P 8deba0cebd135a18da68530fab9e7d19dc21ddcb +R 9f04a6c8c3855aa2715f2066a0bb6a2a U drh -Z 95075c06905af9e6fca1be95088ee79b ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQFMBBv5oxKgR168RlERAmKCAJ953sKjjyeIhzGjYESyG8xuJ6EZyQCfcwsk -dvi+rRNsOxQx96r9i6h2uoU= -=APx0 ------END PGP SIGNATURE----- +Z 4cbd37d85a5a7f671b8f563aa4494f83 diff --git a/manifest.uuid b/manifest.uuid index 469b85a5d5..24eaa2be82 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8deba0cebd135a18da68530fab9e7d19dc21ddcb \ No newline at end of file +bc707c83e5f9849d9d201d695d0d071ca9ed93cb \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index c6ca5fc468..ad95cf10a3 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2066,7 +2066,7 @@ static int semClose(sqlite3_file *id) { semUnlock(id, NO_LOCK); assert( pFile ); unixEnterMutex(); - releaseLockInfo(pFile->pInode); + releaseInodeInfo(pFile->pInode); unixLeaveMutex(); closeUnixFile(id); } @@ -2533,7 +2533,7 @@ static int afpClose(sqlite3_file *id) { */ setPendingFd(pFile); } - releaseLockInfo(pFile->pInode); + releaseInodeInfo(pFile->pInode); sqlite3_free(pFile->lockingContext); rc = closeUnixFile(id); unixLeaveMutex(); @@ -3684,12 +3684,8 @@ static int unixShmLock( static void unixShmBarrier( sqlite3_file *fd /* Database file holding the shared memory */ ){ -#ifdef __GNUC__ - __sync_synchronize(); -#else - unixMutexEnter(); - unixMutexLeave(); -#endif + unixEnterMutex(); + unixLeaveMutex(); }