mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
In test_quota.c, provide a work-around for the missing _chsize_s() function
in mingw. FossilOrigin-Name: 6b4979e86c05f2da2c5fff67ea7feec5fa56756a
This commit is contained in:
@@ -1179,7 +1179,13 @@ int sqlite3_quota_ftruncate(quota_FILE *p, sqlite3_int64 szNew){
|
||||
rc = ftruncate(fileno(p->f), szNew);
|
||||
#endif
|
||||
#if SQLITE_OS_WIN
|
||||
rc = _chsize_s(_fileno(p->f), szNew);
|
||||
# if defined(__MINGW32__) && defined(SQLITE_TEST)
|
||||
/* _chsize_s() is missing from MingW (as of 2012-11-06). Use
|
||||
** _chsize() as a work-around for testing purposes. */
|
||||
rc = _chsize(_fileno(p->f), (long)szNew);
|
||||
# else
|
||||
rc = _chsize_s(_fileno(p->f), szNew);
|
||||
# endif
|
||||
#endif
|
||||
if( pFile && rc==0 ){
|
||||
quotaGroup *pGroup = pFile->pGroup;
|
||||
|
Reference in New Issue
Block a user