Add comments to the code warning that _XOPEN_SOURCE might need to be

defined manually if using USE_PREAD or USE_PREAD64. (CVS 4509)

FossilOrigin-Name: d7ed7cd077fe5f9ffba2bca48b84b231ccfd85b0
This commit is contained in:
drh 2007-10-23 15:59:18 +00:00
parent 71674ce9ce
commit 9e0ebbfa41
4 changed files with 17 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Make\ssure\sthe\s_LARGEFILE_SOURCE\smacro\soccurs\sbefore\sany\ssystem\nincludes.\s\sTicket\s#2739.\s(CVS\s4508)
D 2007-10-23T15:51:27
C Add\scomments\sto\sthe\scode\swarning\sthat\s_XOPEN_SOURCE\smight\sneed\sto\sbe\ndefined\smanually\sif\susing\sUSE_PREAD\sor\sUSE_PREAD64.\s(CVS\s4509)
D 2007-10-23T15:59:18
F Makefile.in 30c7e3ba426ddb253b8ef037d1873425da6009a8
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -117,7 +117,7 @@ F src/os_os2.c 8d8ef4462cfa1b4d824ec55c486bce86fa0ac6fc
F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
F src/os_unix.c 308bd8ad6977f66f608228cccaecc4cbc1a24693
F src/os_unix.c e556e86a2f027102e11f67b1b3a649fce1a8670b
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
F src/os_win.c fe8f2d8fc3a010a2e9d4a0acbdcf4981522cac7b
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
@ -133,7 +133,7 @@ F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
F src/shell.c 82089379833e361ba8a2ae65316a2173785300c0
F src/sqlite.h.in 06c1bbf810800ad11313e646df99b35d90d1c7df
F src/sqlite3ext.h a93f59cdee3638dc0c9c086f80df743a4e68c3cb
F src/sqliteInt.h d06f27ede6c746f173dbd5b8a7047242ff669496
F src/sqliteInt.h 7fd5cfa357d7aefe22cd2bcdfabcca4e7d5ab5b2
F src/sqliteLimit.h 1bcbbdfa856f8b71b561abb31edb864b0eca1d12
F src/table.c 1aeb9eab57b4235db86fe15a35dec76fb445a9c4
F src/tclsqlite.c 29bb44a88e02ca4d2017113b7b1acc839582d57a
@ -584,7 +584,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 7e30fd6a09899842c922b044714dc66796e545d4
R d9c7fcf2ca1443d4e0b73fd2f5d1f543
P 36465aeb1f8f92d336faf16c25608c9a8a6585d3
R c0b489346bd15c8b48b3e65fee073c1d
U drh
Z 191ba2675d247fcea34a3a700c2914c1
Z 77c133e74d0121e59bb624a0598e2ce9

View File

@ -1 +1 @@
36465aeb1f8f92d336faf16c25608c9a8a6585d3
d7ed7cd077fe5f9ffba2bca48b84b231ccfd85b0

View File

@ -772,6 +772,12 @@ static int transferOwnership(unixFile *pFile){
/*
** Seek to the offset passed as the second argument, then read cnt
** bytes into pBuf. Return the number of bytes actually read.
**
** NB: If you define USE_PREAD or USE_PREAD64, then it might also
** be necessary to define _XOPEN_SOURCE to be 500. This varies from
** one system to another. Since SQLite does not define USE_PREAD
** any any form by default, we will not attempt to define _XOPEN_SOURCE.
** See tickets #2741 and #2681.
*/
static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
int got;

View File

@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.616 2007/10/23 15:51:27 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.617 2007/10/23 15:59:18 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@ -112,6 +112,8 @@
** implemented on some systems. So we avoid defining it at all
** if it is already defined or if it is unneeded because we are
** not doing a threadsafe build. Ticket #2681.
**
** See also ticket #2741.
*/
#if !defined(_XOPEN_SOURCE) && !defined(__MACOS__) && SQLITE_THREADSAFE
# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */