/ Check-in [c95f347c]
Login

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

Overview
Comment:Fix compiler warnings under OpenVMS. Ticket #357. (CVS 1088)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c95f347cac27732533a2f6fd4ba50bf00eef59f3
User & Date: drh 2003-08-26 11:41:27
Context
2003-08-27
22:52
Add locks to the in-memory database so that recursive writes will be detected and rejected. Ticket #436. (CVS 1090) check-in: 966b1a16 user: drh tags: trunk
2003-08-26
11:41
Fix compiler warnings under OpenVMS. Ticket #357. (CVS 1088) check-in: c95f347c user: drh tags: trunk
11:35
Try to work around a bug in VC++ by only passing unsigned characters to the isspace() routine. Bug reported on the mailing list. (CVS 1087) check-in: cbe32216 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/func.c.

    12     12   ** This file contains the C functions that implement various SQL
    13     13   ** functions of SQLite.  
    14     14   **
    15     15   ** There is only one exported symbol in this file - the function
    16     16   ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
    17     17   ** All other code has file scope.
    18     18   **
    19         -** $Id: func.c,v 1.29 2003/08/20 01:03:34 drh Exp $
           19  +** $Id: func.c,v 1.30 2003/08/26 11:41:27 drh Exp $
    20     20   */
    21     21   #include <ctype.h>
    22     22   #include <math.h>
    23     23   #include <stdlib.h>
    24     24   #include <assert.h>
    25     25   #include "sqliteInt.h"
    26     26   #include "os.h"
................................................................................
   216    216   **
   217    217   **       A LIKE B
   218    218   **
   219    219   ** is implemented as like(A,B).
   220    220   */
   221    221   static void likeFunc(sqlite_func *context, int arg, const char **argv){
   222    222     if( argv[0]==0 || argv[1]==0 ) return;
   223         -  sqlite_set_result_int(context, sqliteLikeCompare(argv[0], argv[1]));
          223  +  sqlite_set_result_int(context, 
          224  +    sqliteLikeCompare((const unsigned char*)argv[0],
          225  +                      (const unsigned char*)argv[1]));
   224    226   }
   225    227   
   226    228   /*
   227    229   ** Implementation of the glob() SQL function.  This function implements
   228    230   ** the build-in GLOB operator.  The first argument to the function is the
   229    231   ** string and the second argument is the pattern.  So, the SQL statements:
   230    232   **
   231    233   **       A GLOB B
   232    234   **
   233    235   ** is implemented as glob(A,B).
   234    236   */
   235    237   static void globFunc(sqlite_func *context, int arg, const char **argv){
   236    238     if( argv[0]==0 || argv[1]==0 ) return;
   237         -  sqlite_set_result_int(context, sqliteGlobCompare(argv[0], argv[1]));
          239  +  sqlite_set_result_int(context,
          240  +    sqliteGlobCompare((const unsigned char*)argv[0],
          241  +                      (const unsigned char*)argv[1]));
   238    242   }
   239    243   
   240    244   /*
   241    245   ** Implementation of the NULLIF(x,y) function.  The result is the first
   242    246   ** argument if the arguments are different.  The result is NULL if the
   243    247   ** arguments are equal to each other.
   244    248   */

Changes to src/pager.c.

    14     14   ** The pager is used to access a database disk file.  It implements
    15     15   ** atomic commit and rollback through the use of a journal file that
    16     16   ** is separate from the database file.  The pager also implements file
    17     17   ** locking to prevent two processes from writing the same database
    18     18   ** file simultaneously, or one process from reading the database while
    19     19   ** another is writing.
    20     20   **
    21         -** @(#) $Id: pager.c,v 1.88 2003/08/26 11:25:58 drh Exp $
           21  +** @(#) $Id: pager.c,v 1.89 2003/08/26 11:41:27 drh Exp $
    22     22   */
    23     23   #include "os.h"         /* Must be first to enable large file support */
    24     24   #include "sqliteInt.h"
    25     25   #include "pager.h"
    26     26   #include <assert.h>
    27     27   #include <string.h>
    28     28   
................................................................................
   312    312   
   313    313   /*
   314    314   ** Write a 32-bit integer into a page header right before the
   315    315   ** page data.  This will overwrite the PgHdr.pDirty pointer.
   316    316   */
   317    317   static void store32bits(u32 val, PgHdr *p, int offset){
   318    318     unsigned char *ac;
   319         -  ac = &((char*)PGHDR_TO_DATA(p))[offset];
          319  +  ac = &((unsigned char*)PGHDR_TO_DATA(p))[offset];
   320    320     if( journal_format<=1 ){
   321    321       memcpy(ac, &val, 4);
   322    322     }else{
   323    323       ac[0] = (val>>24) & 0xff;
   324    324       ac[1] = (val>>16) & 0xff;
   325    325       ac[2] = (val>>8) & 0xff;
   326    326       ac[3] = val & 0xff;