/ Check-in [57dac995]
Login

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

Overview
Comment:Remove 'timespec' related code from the shell that has no effect and a (now) superfluous 'timespec' typedef from the Win32 dirent header file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sqlar-shell-support
Files: files | file ages | folders
SHA3-256: 57dac995dd028e4b7c8ce6806f5769831715c1bb9b886318fceb3fa50563d537
User & Date: mistachkin 2018-01-04 22:50:52
Context
2018-01-04
23:49
In the 'fileio' extension code for Win32, use the FILE_FLAG_BACKUP_SEMANTICS flag when setting the file times, just in case the file is actually a directory. check-in: 4f344406 user: mistachkin tags: sqlar-shell-support
22:50
Remove 'timespec' related code from the shell that has no effect and a (now) superfluous 'timespec' typedef from the Win32 dirent header file. check-in: 57dac995 user: mistachkin tags: sqlar-shell-support
22:46
Get the shell enhancements compiling with MSVC. check-in: 335387f9 user: mistachkin tags: sqlar-shell-support
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  4751   4751     };
  4752   4752     const char *azSource[] = {
  4753   4753       "sqlar", "zipfile(?3)"
  4754   4754     };
  4755   4755   
  4756   4756   
  4757   4757   
  4758         -  struct timespec times[2];
  4759   4758     sqlite3_stmt *pSql = 0;
  4760   4759     int rc = SQLITE_OK;
  4761   4760     char *zDir = 0;
  4762   4761     char *zWhere = 0;
  4763   4762     int i;
  4764   4763   
  4765   4764     /* If arguments are specified, check that they actually exist within
................................................................................
  4773   4772         zDir = sqlite3_mprintf("%s/", pAr->zDir);
  4774   4773       }else{
  4775   4774         zDir = sqlite3_mprintf("");
  4776   4775       }
  4777   4776       if( zDir==0 ) rc = SQLITE_NOMEM;
  4778   4777     }
  4779   4778   
  4780         -  memset(times, 0, sizeof(times));
  4781         -  times[0].tv_sec = time(0);
  4782         -
  4783   4779     shellPreparePrintf(db, &rc, &pSql, zSql1, 
  4784   4780         azExtraArg[pAr->bZip], azSource[pAr->bZip], zWhere
  4785   4781     );
  4786   4782   
  4787   4783     if( rc==SQLITE_OK ){
  4788   4784       sqlite3_bind_text(pSql, 1, zDir, -1, SQLITE_STATIC);
  4789   4785       if( pAr->bZip ){

Changes to src/test_windirent.h.

   118    118   typedef struct DIR DIR;
   119    119   typedef DIR *LPDIR;
   120    120   struct DIR {
   121    121     intptr_t d_handle; /* Value returned by "_findfirst". */
   122    122     DIRENT d_first;    /* DIRENT constructed based on "_findfirst". */
   123    123     DIRENT d_next;     /* DIRENT constructed based on "_findnext". */
   124    124   };
   125         -#endif
   126         -
   127         -#ifndef TIMESPEC_DEFINED
   128         -#define TIMESPEC_DEFINED
   129         -typedef struct TIMESPEC TIMESPEC;
   130         -typedef TIMESPEC *LPTIMESPEC;
   131         -struct TIMESPEC {
   132         -  time_t tv_sec; /* Number of whole seconds. */
   133         -  long tv_nsec;  /* Number of whole nanoseconds. */
   134         -};
   135    125   #endif
   136    126   
   137    127   /*
   138    128   ** Provide a macro, for use by the implementation, to determine if a
   139    129   ** particular directory entry should be skipped over when searching for
   140    130   ** the next directory entry that should be returned by the readdir() or
   141    131   ** readdir_r() functions.