mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Fix more things
- Update a couple unicode data files - Disable strace during logger calls - SQLite now uses pread() / pwrite() - pread() past EOF on NT now returns 0 - Make the NT mmap() and fork() code elegant - Give NT a big performance boost with memory - Add many more mmap() tests to prove it works
This commit is contained in:
parent
b90fa996b4
commit
98909b1391
36 changed files with 1034 additions and 318 deletions
17
third_party/sqlite3/os_unix.c
vendored
17
third_party/sqlite3/os_unix.c
vendored
|
@ -1,3 +1,4 @@
|
|||
// clang-format off
|
||||
/*
|
||||
** 2004 May 22
|
||||
**
|
||||
|
@ -44,9 +45,9 @@
|
|||
** plus implementations of sqlite3_os_init() and sqlite3_os_end().
|
||||
*/
|
||||
#include "libc/rand/rand.h"
|
||||
#include "libc/sysv/consts/lock.h"
|
||||
#include "third_party/sqlite3/sqliteInt.inc"
|
||||
#if SQLITE_OS_UNIX /* This file is used on unix only */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
** There are various methods for file locking used for concurrency
|
||||
|
@ -74,7 +75,7 @@
|
|||
#endif
|
||||
|
||||
/* Use pread() and pwrite() if they are available */
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) || defined(__COSMOPOLITAN__)
|
||||
# define HAVE_PREAD 1
|
||||
# define HAVE_PWRITE 1
|
||||
#endif
|
||||
|
@ -140,10 +141,6 @@
|
|||
#include "libc/limits.h"
|
||||
#endif /* OS_VXWORKS */
|
||||
|
||||
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
|
||||
# include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UTIME
|
||||
#include "libc/time/time.h"
|
||||
#endif
|
||||
|
@ -331,14 +328,6 @@ static pid_t randomnessPid = 0;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Explicitly call the 64-bit version of lseek() on Android. Otherwise, lseek()
|
||||
** is the 32-bit version, even if _FILE_OFFSET_BITS=64 is defined.
|
||||
*/
|
||||
#ifdef __ANDROID__
|
||||
# define lseek lseek64
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
/*
|
||||
** Linux-specific IOCTL magic numbers used for controlling F2FS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue