984 static int asyncOpen(
    985   sqlite3_vfs *pAsyncVfs,
--->986   const char *zName,
    987   sqlite3_file *pFile,
    988   int flags,
    989   int *pOutFlags
    990 ){
   ...
-->1009   int nName = strlen(zName)+1;
   ...
   1016   nByte = (
   1017     sizeof(AsyncFileData) +        /* AsyncFileData structure */
   1018     2 * pVfs->szOsFile +           /* AsyncFileData.pBaseRead and 
pBaseWrite */
   1019     nName                          /* AsyncFileData.zName */
   1020   );
   1021   pData = sqlite3_malloc(nByte);
   1022   if( !pData ){
   1023     return SQLITE_NOMEM;
   1024   }
   1025   memset(pData, 0, nByte);
   1026   pData->zName = (char *)&pData[1];
   1027   pData->nName = nName;
-->1028   pData->pBaseRead = (sqlite3_file *)&pData->zName[nName];
-->1029   pData->pBaseWrite = (sqlite3_file 
*)&pData->zName[nName+pVfs->szOsFile];
   1030   pData->close.pFileData = pData;
   1031   pData->close.op = ASYNC_CLOSE;
   1032   memcpy(pData->zName, zName, nName);

nName is strlen(zName)+1, so pData->pBaseRead depends on the length of
zName, but pData->pBaseRead has to be aligned.

zName is always $(/bin/pwd)/test.db, I think.

So gmake fulltest will pass or fail depending on the length of the
absolute path of the current directory.

Those casts will get you!

Also, the test suite uses private interfaces.  That's fine, but it
prevents testing a shared libsqlite3 built from the amalgamation (or
built with a modified Makefile that provides a mapfile to effect symbol
scope reduction).

BTW, the amalgamation + SQLITE_PRIVATE is a brilliantly portable way to
get symbol scope reduction for private interfaces.  Hats off.

(Of course, on Solaris the "Right Way" (tm) to do symbol scope reduction
is to use a mapfile.  But that's another story.)

Nico
-- 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to