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

Various #ifdef enhancements for improved VxWorks support.

FossilOrigin-Name: 75cd41ff179e29c5d45f9d7fed784bc339e0d7a0
This commit is contained in:
drh
2016-01-12 00:37:55 +00:00
parent 00dcecab19
commit e2258a2076
4 changed files with 23 additions and 11 deletions

View File

@@ -430,7 +430,11 @@ static struct unix_syscall {
{ "rmdir", (sqlite3_syscall_ptr)rmdir, 0 },
#define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
#if defined(HAVE_FCHOWN)
{ "fchown", (sqlite3_syscall_ptr)fchown, 0 },
#else
{ "fchown", (sqlite3_syscall_ptr)0, 0 },
#endif
#define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
{ "geteuid", (sqlite3_syscall_ptr)geteuid, 0 },
@@ -464,7 +468,11 @@ static struct unix_syscall {
#endif
#define osGetpagesize ((int(*)(void))aSyscall[25].pCurrent)
#if defined(HAVE_READLINK)
{ "readlink", (sqlite3_syscall_ptr)readlink, 0 },
#else
{ "readlink", (sqlite3_syscall_ptr)0, 0 },
#endif
#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[26].pCurrent)
@@ -477,10 +485,10 @@ static struct unix_syscall {
** we are not running as root.
*/
static int robustFchown(int fd, uid_t uid, gid_t gid){
#if OS_VXWORKS
return 0;
#else
#if defined(HAVE_FCHOWN)
return osGeteuid() ? 0 : osFchown(fd,uid,gid);
#else
return 0;
#endif
}
@@ -5947,6 +5955,7 @@ static int unixFullPathname(
assert( pVfs->mxPathname==MAX_PATHNAME );
UNUSED_PARAMETER(pVfs);
#if defined(HAVE_READLINK)
/* Attempt to resolve the path as if it were a symbolic link. If it is
** a symbolic link, the resolved path is stored in buffer zOut[]. Or, if
** the identified file is not a symbolic link or does not exist, then
@@ -5962,6 +5971,7 @@ static int unixFullPathname(
}else{
zOut[nByte] = '\0';
}
#endif
/* If buffer zOut[] now contains an absolute path there is nothing more
** to do. If it contains a relative path, do the following: