mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
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:
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user