1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Do not invoke a C preprocessor macro with an empty argument, as (reportedly)

some versions of GCC are unable to deal with that.

FossilOrigin-Name: de9da317d4df3efefe9a1a48f954af8a19e7d098
This commit is contained in:
drh
2015-03-21 20:59:43 +00:00
parent 3858cb44b6
commit 5ac936529c
3 changed files with 25 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
C Add\sa\smissing\s"int"\son\sa\sconstant\sdeclaration. C Do\snot\sinvoke\sa\sC\spreprocessor\smacro\swith\san\sempty\sargument,\sas\s(reportedly)\nsome\sversions\sof\sGCC\sare\sunable\sto\sdeal\swith\sthat.
D 2015-03-21T20:50:58.948 D 2015-03-21T20:59:43.779
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 88a3e6261286db378fdffa1124cad11b3c05f5bb F Makefile.in 88a3e6261286db378fdffa1124cad11b3c05f5bb
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -214,7 +214,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8
F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
F src/os_unix.c e68c8e77e47ce38865ebf8e1a0e877ac955f469c F src/os_unix.c a4dadbc2da41599e99093e91e276c38c17a73b89
F src/os_win.c 8223e7db5b7c4a81d8b161098ac3959400434cdb F src/os_win.c 8223e7db5b7c4a81d8b161098ac3959400434cdb
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
F src/pager.c 4120a49ecd37697e28f5ed807f470b9c0b88410c F src/pager.c 4120a49ecd37697e28f5ed807f470b9c0b88410c
@@ -1246,7 +1246,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 6d0989695b486275824c14d5f88357267c1e8104 P 235157de5113ac4c750e36a498e2a1f1cf461751
R f4c5c38b537072acd0ef8cbe1e26c753 R 4027cff60803cc3b440b57484c5f02d8
U drh U drh
Z c60ff55e80e06532c78f97fe504967fd Z 5a82a26aab899b185210ad558ba95050

View File

@@ -1 +1 @@
235157de5113ac4c750e36a498e2a1f1cf461751 de9da317d4df3efefe9a1a48f954af8a19e7d098

View File

@@ -1536,7 +1536,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){
OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (unix)\n", pFile->h, OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (unix)\n", pFile->h,
azFileLock(eFileLock), azFileLock(pFile->eFileLock), azFileLock(eFileLock), azFileLock(pFile->eFileLock),
azFileLock(pFile->pInode->eFileLock), pFile->pInode->nShared, azFileLock(pFile->pInode->eFileLock), pFile->pInode->nShared,
osGetpid())); osGetpid(0)));
/* If there is already a lock of this type or more restrictive on the /* If there is already a lock of this type or more restrictive on the
** unixFile, do nothing. Don't use the end_lock: exit path, as ** unixFile, do nothing. Don't use the end_lock: exit path, as
@@ -1744,7 +1744,7 @@ static int posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){
assert( pFile ); assert( pFile );
OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (unix)\n", pFile->h, eFileLock, OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (unix)\n", pFile->h, eFileLock,
pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared, pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
osGetpid())); osGetpid(0)));
assert( eFileLock<=SHARED_LOCK ); assert( eFileLock<=SHARED_LOCK );
if( pFile->eFileLock<=eFileLock ){ if( pFile->eFileLock<=eFileLock ){
@@ -2171,7 +2171,7 @@ static int dotlockUnlock(sqlite3_file *id, int eFileLock) {
assert( pFile ); assert( pFile );
OSTRACE(("UNLOCK %d %d was %d pid=%d (dotlock)\n", pFile->h, eFileLock, OSTRACE(("UNLOCK %d %d was %d pid=%d (dotlock)\n", pFile->h, eFileLock,
pFile->eFileLock, osGetpid())); pFile->eFileLock, osGetpid(0)));
assert( eFileLock<=SHARED_LOCK ); assert( eFileLock<=SHARED_LOCK );
/* no-op if possible */ /* no-op if possible */
@@ -2389,7 +2389,7 @@ static int flockUnlock(sqlite3_file *id, int eFileLock) {
assert( pFile ); assert( pFile );
OSTRACE(("UNLOCK %d %d was %d pid=%d (flock)\n", pFile->h, eFileLock, OSTRACE(("UNLOCK %d %d was %d pid=%d (flock)\n", pFile->h, eFileLock,
pFile->eFileLock, osGetpid())); pFile->eFileLock, osGetpid(0)));
assert( eFileLock<=SHARED_LOCK ); assert( eFileLock<=SHARED_LOCK );
/* no-op if possible */ /* no-op if possible */
@@ -2557,7 +2557,7 @@ static int semXUnlock(sqlite3_file *id, int eFileLock) {
assert( pFile ); assert( pFile );
assert( pSem ); assert( pSem );
OSTRACE(("UNLOCK %d %d was %d pid=%d (sem)\n", pFile->h, eFileLock, OSTRACE(("UNLOCK %d %d was %d pid=%d (sem)\n", pFile->h, eFileLock,
pFile->eFileLock, osGetpid())); pFile->eFileLock, osGetpid(0)));
assert( eFileLock<=SHARED_LOCK ); assert( eFileLock<=SHARED_LOCK );
/* no-op if possible */ /* no-op if possible */
@@ -2771,7 +2771,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){
assert( pFile ); assert( pFile );
OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (afp)\n", pFile->h, OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (afp)\n", pFile->h,
azFileLock(eFileLock), azFileLock(pFile->eFileLock), azFileLock(eFileLock), azFileLock(pFile->eFileLock),
azFileLock(pInode->eFileLock), pInode->nShared , osGetpid())); azFileLock(pInode->eFileLock), pInode->nShared , osGetpid(0)));
/* If there is already a lock of this type or more restrictive on the /* If there is already a lock of this type or more restrictive on the
** unixFile, do nothing. Don't use the afp_end_lock: exit path, as ** unixFile, do nothing. Don't use the afp_end_lock: exit path, as
@@ -2957,7 +2957,7 @@ static int afpUnlock(sqlite3_file *id, int eFileLock) {
assert( pFile ); assert( pFile );
OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (afp)\n", pFile->h, eFileLock, OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (afp)\n", pFile->h, eFileLock,
pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared, pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
osGetpid())); osGetpid(0)));
assert( eFileLock<=SHARED_LOCK ); assert( eFileLock<=SHARED_LOCK );
if( pFile->eFileLock<=eFileLock ){ if( pFile->eFileLock<=eFileLock ){
@@ -4636,7 +4636,7 @@ static int unixShmLock(
} }
sqlite3_mutex_leave(pShmNode->mutex); sqlite3_mutex_leave(pShmNode->mutex);
OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x\n", OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x\n",
p->id, osGetpid(), p->sharedMask, p->exclMask)); p->id, osGetpid(0), p->sharedMask, p->exclMask));
return rc; return rc;
} }
@@ -5731,8 +5731,8 @@ static int unixOpen(
** the same instant might all reset the PRNG. But multiple resets ** the same instant might all reset the PRNG. But multiple resets
** are harmless. ** are harmless.
*/ */
if( randomnessPid!=osGetpid() ){ if( randomnessPid!=osGetpid(0) ){
randomnessPid = osGetpid(); randomnessPid = osGetpid(0);
sqlite3_randomness(0,0); sqlite3_randomness(0,0);
} }
@@ -6123,7 +6123,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
** tests repeatable. ** tests repeatable.
*/ */
memset(zBuf, 0, nBuf); memset(zBuf, 0, nBuf);
randomnessPid = osGetpid(); randomnessPid = osGetpid(0);
#if !defined(SQLITE_TEST) #if !defined(SQLITE_TEST)
{ {
int fd, got; int fd, got;
@@ -6444,7 +6444,7 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
{ {
if( !confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) ){ if( !confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) ){
OSTRACE(("GETLOCKPATH failed %s errno=%d pid=%d\n", OSTRACE(("GETLOCKPATH failed %s errno=%d pid=%d\n",
lPath, errno, osGetpid())); lPath, errno, osGetpid(0)));
return SQLITE_IOERR_LOCK; return SQLITE_IOERR_LOCK;
} }
len = strlcat(lPath, "sqliteplocks", maxLen); len = strlcat(lPath, "sqliteplocks", maxLen);
@@ -6466,7 +6466,7 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
} }
lPath[i+len]='\0'; lPath[i+len]='\0';
strlcat(lPath, ":auto:", maxLen); strlcat(lPath, ":auto:", maxLen);
OSTRACE(("GETLOCKPATH proxy lock path=%s pid=%d\n", lPath, osGetpid())); OSTRACE(("GETLOCKPATH proxy lock path=%s pid=%d\n", lPath, osGetpid(0)));
return SQLITE_OK; return SQLITE_OK;
} }
@@ -6493,7 +6493,7 @@ static int proxyCreateLockPath(const char *lockPath){
if( err!=EEXIST ) { if( err!=EEXIST ) {
OSTRACE(("CREATELOCKPATH FAILED creating %s, " OSTRACE(("CREATELOCKPATH FAILED creating %s, "
"'%s' proxy lock path=%s pid=%d\n", "'%s' proxy lock path=%s pid=%d\n",
buf, strerror(err), lockPath, osGetpid())); buf, strerror(err), lockPath, osGetpid(0)));
return err; return err;
} }
} }
@@ -6502,7 +6502,7 @@ static int proxyCreateLockPath(const char *lockPath){
} }
buf[i] = lockPath[i]; buf[i] = lockPath[i];
} }
OSTRACE(("CREATELOCKPATH proxy lock path=%s pid=%d\n", lockPath, osGetpid())); OSTRACE(("CREATELOCKPATH proxy lock path=%s pid=%d\n", lockPath, osGetpid(0)));
return 0; return 0;
} }
@@ -6808,7 +6808,7 @@ static int proxyTakeConch(unixFile *pFile){
OSTRACE(("TAKECONCH %d for %s pid=%d\n", conchFile->h, OSTRACE(("TAKECONCH %d for %s pid=%d\n", conchFile->h,
(pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"),
osGetpid())); osGetpid(0)));
rc = proxyGetHostID(myHostID, &pError); rc = proxyGetHostID(myHostID, &pError);
if( (rc&0xff)==SQLITE_IOERR ){ if( (rc&0xff)==SQLITE_IOERR ){
@@ -7018,7 +7018,7 @@ static int proxyReleaseConch(unixFile *pFile){
conchFile = pCtx->conchFile; conchFile = pCtx->conchFile;
OSTRACE(("RELEASECONCH %d for %s pid=%d\n", conchFile->h, OSTRACE(("RELEASECONCH %d for %s pid=%d\n", conchFile->h,
(pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"),
osGetpid())); osGetpid(0)));
if( pCtx->conchHeld>0 ){ if( pCtx->conchHeld>0 ){
rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK); rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
} }
@@ -7160,7 +7160,7 @@ static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
} }
OSTRACE(("TRANSPROXY %d for %s pid=%d\n", pFile->h, OSTRACE(("TRANSPROXY %d for %s pid=%d\n", pFile->h,
(lockPath ? lockPath : ":auto:"), osGetpid())); (lockPath ? lockPath : ":auto:"), osGetpid(0)));
pCtx = sqlite3_malloc( sizeof(*pCtx) ); pCtx = sqlite3_malloc( sizeof(*pCtx) );
if( pCtx==0 ){ if( pCtx==0 ){