/ Check-in [9e91b729]
Login

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

Overview
Comment:fix an HPUX bug (CVS 1709)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9e91b729f0a708b08060979a4998be890b6d268d
User & Date: drh 2000-10-19 15:28:41
Context
2000-10-22
20:39
fix a debugging issue (CVS 162) check-in: f0a5255d user: drh tags: trunk
2000-10-19
15:28
fix an HPUX bug (CVS 1709) check-in: 9e91b729 user: drh tags: trunk
15:00
Version 1.0.14 (CVS 489) check-in: 4788dc32 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/dbbemem.c.

    24     24   ** This file contains code to implement the database backend (DBBE)
    25     25   ** for sqlite.  The database backend is the interface between
    26     26   ** sqlite and the code that does the actually reading and writing
    27     27   ** of information to the disk.
    28     28   **
    29     29   ** This file uses an in-memory hash talbe as the database backend. 
    30     30   **
    31         -** $Id: dbbemem.c,v 1.3 2000/10/19 14:18:34 drh Exp $
           31  +** $Id: dbbemem.c,v 1.4 2000/10/19 15:28:41 drh Exp $
    32     32   */
    33     33   #include "sqliteInt.h"
    34     34   #include <sys/stat.h>
    35     35   #include <unistd.h>
    36     36   #include <ctype.h>
    37     37   #include <time.h>
    38     38   
................................................................................
   133    133   
   134    134   /*
   135    135   ** Generate a hash from an N-byte key
   136    136   */
   137    137   static int ArrayHash(Datum d){
   138    138     int h = 0;
   139    139     while( d.n-- > 0 ){
   140         -    h = (h<<9) ^ (h<<3) ^ h ^ *(((char*)d.p)++);
          140  +    /* The funky case "*(char**)&d.p" is to work around a bug the
          141  +    ** c89 compiler of HPUX. */
          142  +    h = (h<<9) ^ (h<<3) ^ h ^ *((*(char**)&d.p)++);
   141    143     }
   142    144     if( h<0 ) h = -h; 
   143    145     return h;
   144    146   }
   145    147   
   146    148   /* Resize the hash table for a Array array
   147    149   */