/ Check-in [23653f7a]
Login

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

Overview
Comment:Move the sqlite3_temp_directory global variable out of the OS porting layer and into main.c so that it is more accessible to non-standard OS porting layers. (CVS 3759)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 23653f7aab6609f69948a7366bef9ebd0fd4d0b1
User & Date: drh 2007-03-30 11:29:32
Context
2007-03-30
13:01
Avoid using the "clock" command in test scripts since it is a proc in Tcl8.5 and is thus not available to testfixture. (CVS 3760) check-in: 339941d8 user: drh tags: trunk
11:29
Move the sqlite3_temp_directory global variable out of the OS porting layer and into main.c so that it is more accessible to non-standard OS porting layers. (CVS 3759) check-in: 23653f7a user: drh tags: trunk
11:23
Remove the anonymous union from the sqlite3_value structure since some compilers are unable to deal with it. (CVS 3758) check-in: 6b995259 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.364 2007/03/30 07:10:51 danielk1977 Exp $
           17  +** $Id: main.c,v 1.365 2007/03/30 11:29:32 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <ctype.h>
    22     22   
    23     23   /*
    24     24   ** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
    36     36   /*
    37     37   ** If the following function pointer is not NULL and if
    38     38   ** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
    39     39   ** I/O active are written using this function.  These messages
    40     40   ** are intended for debugging activity only.
    41     41   */
    42     42   void (*sqlite3_io_trace)(const char*, ...) = 0;
           43  +
           44  +/*
           45  +** If the following global variable points to a string which is the
           46  +** name of a directory, then that directory will be used to store
           47  +** temporary files.
           48  +**
           49  +** See also the "PRAGMA temp_store_directory" SQL command.
           50  +*/
           51  +char *sqlite3_temp_directory = 0;
           52  +
    43     53   
    44     54   /*
    45     55   ** This is the default collating function named "BINARY" which is always
    46     56   ** available.
    47     57   */
    48     58   static int binCollFunc(
    49     59     void *NotUsed,

Changes to src/os_os2.c.

   220    220   int os2OpenDirectory(
   221    221     OsFile *id,
   222    222     const char *zDirname
   223    223   ){
   224    224     return SQLITE_OK;
   225    225   }
   226    226   
   227         -/*
   228         -** If the following global variable points to a string which is the
   229         -** name of a directory, then that directory will be used to store
   230         -** temporary files.
   231         -*/
   232         -char *sqlite3_temp_directory = 0;
   233         -
   234    227   /*
   235    228   ** Create a temporary file name in zBuf.  zBuf must be big enough to
   236    229   ** hold at least SQLITE_TEMPNAME_SIZE characters.
   237    230   */
   238    231   int sqlite3Os2TempFileName( char *zBuf ){
   239    232     static const unsigned char zChars[] =
   240    233       "abcdefghijklmnopqrstuvwxyz"

Changes to src/os_unix.c.

   927    927     if( pFile->dirfd<0 ){
   928    928       return SQLITE_CANTOPEN; 
   929    929     }
   930    930     OSTRACE3("OPENDIR %-3d %s\n", pFile->dirfd, zDirname);
   931    931     return SQLITE_OK;
   932    932   }
   933    933   
   934         -/*
   935         -** If the following global variable points to a string which is the
   936         -** name of a directory, then that directory will be used to store
   937         -** temporary files.
   938         -**
   939         -** See also the "PRAGMA temp_store_directory" SQL command.
   940         -*/
   941         -char *sqlite3_temp_directory = 0;
   942         -
   943    934   /*
   944    935   ** Create a temporary file name in zBuf.  zBuf must be big enough to
   945    936   ** hold at least SQLITE_TEMPNAME_SIZE characters.
   946    937   */
   947    938   int sqlite3UnixTempFileName(char *zBuf){
   948    939     static const char *azDirs[] = {
   949    940        0,

Changes to src/os_win.c.

   894    894   static int winOpenDirectory(
   895    895     OsFile *id,
   896    896     const char *zDirname
   897    897   ){
   898    898     return SQLITE_OK;
   899    899   }
   900    900   
   901         -/*
   902         -** If the following global variable points to a string which is the
   903         -** name of a directory, then that directory will be used to store
   904         -** temporary files.
   905         -*/
   906         -char *sqlite3_temp_directory = 0;
   907         -
   908    901   /*
   909    902   ** Create a temporary file name in zBuf.  zBuf must be big enough to
   910    903   ** hold at least SQLITE_TEMPNAME_SIZE characters.
   911    904   */
   912    905   int sqlite3WinTempFileName(char *zBuf){
   913    906     static char zChars[] =
   914    907       "abcdefghijklmnopqrstuvwxyz"