SQLite

Check-in [f18b2524]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Extend the strerror_r() result type discrepancy check in os_unix.c to include the Android NDK, as reported in forum post 3f13857fa4062301. The NDK's strerror_r() signature is version-dependent, whereas this change assumes int return (POSIX semantic) across all versions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f18b2524da6bbbcf372b292df52fbe6efa49fd6e1f1f13ef2447279d559f7a08
User & Date: stephan 2024-02-19 12:20:46
Original Comment: Extend the strerror_r() result type discrepancy check in os_unix.c to include the Android NDK, as reported in [forum post 3f13857fa4062301|forum:3f13857fa4062301]. The NDK's strerror_r() signature is version-dependent, whereas this change assumes int return (POSIX semantic) across all versions.
Context
2024-02-20
12:48
Enhancements to PRAGMA optimize and ANALYZE. Add the 0x10000 flag to PRAGMA optimize. ANALYZE now records zero-size partial indexes in the sqlite_stat1 table. PRAGMA optimize looks for both growth and shrinkage in table sizes, and uses tighter bounds (10x rather than 25x) to trigger a re-analyze. PRAGMA optimize automatically uses are reasonable analysis_limit to prevent excessive runtimes. (check-in: 63ef234e user: drh tags: trunk)
2024-02-19
18:55
Merge trunk fixes into the better-pragma-optimize branch. (check-in: 2cf78a5b user: drh tags: better-pragma-optimize)
12:20
Extend the strerror_r() result type discrepancy check in os_unix.c to include the Android NDK, as reported in forum post 3f13857fa4062301. The NDK's strerror_r() signature is version-dependent, whereas this change assumes int return (POSIX semantic) across all versions. (check-in: f18b2524 user: stephan tags: trunk)
2024-02-17
03:32
Fix rounding in zero-precision %f and %g printf conversions. Forum post 393708f4a8. This bug was introduced by check-in [32befb224b254639] and first appeared in version 3.43.0. (check-in: 7fca1bc4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_unix.c.
1291
1292
1293
1294
1295
1296
1297



1298
1299

1300
1301
1302
1303
1304
1305
1306
  ** Otherwise, assume that the system provides the POSIX version of
  ** strerror_r(), which always writes an error message into aErr[].
  **
  ** If the code incorrectly assumes that it is the POSIX version that is
  ** available, the error message will often be an empty string. Not a
  ** huge problem. Incorrectly concluding that the GNU version is available
  ** could lead to a segfault though.



  */
#if defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)

  zErr =
# endif
  strerror_r(iErrno, aErr, sizeof(aErr)-1);

#elif SQLITE_THREADSAFE
  /* This is a threadsafe build, but strerror_r() is not available. */
  zErr = "";







>
>
>

|
>







1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
  ** Otherwise, assume that the system provides the POSIX version of
  ** strerror_r(), which always writes an error message into aErr[].
  **
  ** If the code incorrectly assumes that it is the POSIX version that is
  ** available, the error message will often be an empty string. Not a
  ** huge problem. Incorrectly concluding that the GNU version is available
  ** could lead to a segfault though.
  **
  ** Forum post 3f13857fa4062301 reports that the Android SDK may use
  ** int-type return, depending on its version.
  */
#if (defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)) \
  && !defined(ANDROID) && !defined(__ANDROID__)
  zErr =
# endif
  strerror_r(iErrno, aErr, sizeof(aErr)-1);

#elif SQLITE_THREADSAFE
  /* This is a threadsafe build, but strerror_r() is not available. */
  zErr = "";