SQLite

Check-in [e203ad400d]
Login

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

Overview
Comment:Fix access violation on WinCE platforms. Ticket #3804. (CVS 6509)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e203ad400dd61431b3e6b8219eb5357b6ca06561
User & Date: shane 2009-04-15 14:36:26.000
Context
2009-04-15
15:16
Fix the group_concat() function so that it inserts the separator string even if the initial content strings are empty. Ticket #3806. (CVS 6510) (check-in: b83fbf15a3 user: drh tags: trunk)
14:36
Fix access violation on WinCE platforms. Ticket #3804. (CVS 6509) (check-in: e203ad400d user: shane tags: trunk)
13:39
Mark an branch in alter.c as always false. Only run the assert() on the sqlite3_aggregate_count() function in func.c if the SQLITE_OMIT_DEPRECATED compile-time option is off. (CVS 6508) (check-in: c0bba77ae6 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_win.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This file contains code that is specific to windows.
**
** $Id: os_win.c,v 1.154 2009/04/09 14:27:07 chw Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_WIN               /* This file is used for windows only */


/*
** A Note About Memory Allocation:







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This file contains code that is specific to windows.
**
** $Id: os_win.c,v 1.155 2009/04/15 14:36:26 shane Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_WIN               /* This file is used for windows only */


/*
** A Note About Memory Allocation:
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
  */
  rc = winFullPathname(pVfs, zRelative, MAX_PATH, zFullpath);
  if( rc == SQLITE_OK )
  {
    void *zConverted = convertUtf8Filename(zFullpath);
    if( zConverted ){
      if( isNT() ){
        int i;
        /* trim path to just drive reference */
        WCHAR *p = zConverted;
        for(i=0;i<MAX_PATH;i++){
          if( p[i] == '\\' ){
            i++;
            p[i] = '\0';
            break;
          }
        }
        dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted,
                                  &dwDummy,
                                  &bytesPerSector,
                                  &dwDummy,
                                  &dwDummy);
#if SQLITE_OS_WINCE==0
      }else{
        int i;
        /* trim path to just drive reference */
        CHAR *p = (CHAR *)zConverted;
        for(i=0;i<MAX_PATH;i++){
          if( p[i] == '\\' ){
            i++;
            p[i] = '\0';
            break;
          }
        }
        dwRet = GetDiskFreeSpaceA((CHAR*)zConverted,
                                  &dwDummy,
                                  &bytesPerSector,
                                  &dwDummy,







<


|
|
<
|










<


|
|
<
|







1596
1597
1598
1599
1600
1601
1602

1603
1604
1605
1606

1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617

1618
1619
1620
1621

1622
1623
1624
1625
1626
1627
1628
1629
  */
  rc = winFullPathname(pVfs, zRelative, MAX_PATH, zFullpath);
  if( rc == SQLITE_OK )
  {
    void *zConverted = convertUtf8Filename(zFullpath);
    if( zConverted ){
      if( isNT() ){

        /* trim path to just drive reference */
        WCHAR *p = zConverted;
        for(;*p;p++){
          if( *p == '\\' ){

            *p = '\0';
            break;
          }
        }
        dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted,
                                  &dwDummy,
                                  &bytesPerSector,
                                  &dwDummy,
                                  &dwDummy);
#if SQLITE_OS_WINCE==0
      }else{

        /* trim path to just drive reference */
        CHAR *p = (CHAR *)zConverted;
        for(;*p;p++){
          if( *p == '\\' ){

            *p = '\0';
            break;
          }
        }
        dwRet = GetDiskFreeSpaceA((CHAR*)zConverted,
                                  &dwDummy,
                                  &bytesPerSector,
                                  &dwDummy,