SQLite

Check-in [44deaaefee]
Login

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

Overview
Comment:Do not call gethostuuid() on MacOS 10.4 and earlier, since it is not supported there.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 44deaaefeeb95827daeaf84aa5e205b456e75b40
User & Date: drh 2010-09-25 14:13:18.000
Context
2010-09-25
17:29
Add new file e_createtable.test. (check-in: 20e16fef55 user: dan tags: trunk)
14:13
Do not call gethostuuid() on MacOS 10.4 and earlier, since it is not supported there. (check-in: 44deaaefee user: drh tags: trunk)
07:51
Add tests to file e_reindex.test. (check-in: eec7dc9192 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_unix.c.
5378
5379
5380
5381
5382
5383
5384


5385
5386
5387
5388
5389
5390
5391

5392
5393
5394
5395
5396
5397
5398
** bytes of writable memory.
*/
static int proxyGetHostID(unsigned char *pHostID, int *pError){
  struct timespec timeout = {1, 0}; /* 1 sec timeout */
  
  assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
  memset(pHostID, 0, PROXY_HOSTIDLEN);


  if( gethostuuid(pHostID, &timeout) ){
    int err = errno;
    if( pError ){
      *pError = err;
    }
    return SQLITE_IOERR;
  }

#ifdef SQLITE_TEST
  /* simulate multiple hosts by creating unique hostid file paths */
  if( sqlite3_hostid_num != 0){
    pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));
  }
#endif
  







>
>







>







5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
** bytes of writable memory.
*/
static int proxyGetHostID(unsigned char *pHostID, int *pError){
  struct timespec timeout = {1, 0}; /* 1 sec timeout */
  
  assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
  memset(pHostID, 0, PROXY_HOSTIDLEN);
#if defined(__MAX_OS_X_VERSION_MIN_REQUIRED)\
               && __MAC_OS_X_VERSION_MIN_REQUIRED<1050
  if( gethostuuid(pHostID, &timeout) ){
    int err = errno;
    if( pError ){
      *pError = err;
    }
    return SQLITE_IOERR;
  }
#endif
#ifdef SQLITE_TEST
  /* simulate multiple hosts by creating unique hostid file paths */
  if( sqlite3_hostid_num != 0){
    pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));
  }
#endif