/ Check-in [af84774d]
Login

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

Overview
Comment:Disable unix-specific features of dbfuzz2 when compiling on windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: af84774d1eebcfe6a61b564b4edf280ad3c3a93f39b7f70b6fcc56f7bbdfb9eb
User & Date: drh 2019-02-20 19:06:16
Context
2019-02-20
19:20
Changes to the unix VFS that allegedly enable it to build of Fuchsia. We have no way of testing this. check-in: be21a641 user: drh tags: trunk
19:06
Disable unix-specific features of dbfuzz2 when compiling on windows. check-in: af84774d user: drh tags: trunk
18:13
Avoid the use of function pointers in columnName(), as function pointers appear to be a source of consternation to LLVM. check-in: c48f6f39 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/dbfuzz2.c.

    39     39   #include <assert.h>
    40     40   #include <stdio.h>
    41     41   #include <stdlib.h>
    42     42   #include <string.h>
    43     43   #include <stdarg.h>
    44     44   #include <ctype.h>
    45     45   #include <stdint.h>
           46  +#ifndef _WIN32
    46     47   #include <sys/time.h>
    47     48   #include <sys/resource.h>
           49  +#endif
    48     50   #include "sqlite3.h"
    49     51   
    50     52   /*
    51     53   ** This is the is the SQL that is run against the database.
    52     54   */
    53     55   static const char *azSql[] = {
    54     56     "PRAGMA integrity_check;",
................................................................................
   257    259           if( i+1==argc ){
   258    260             fprintf(stderr, "missing argument to %s\n", argv[i]);
   259    261             exit(1);
   260    262           }
   261    263           szMax = strtol(argv[++i], 0, 0);
   262    264           continue;
   263    265         }
          266  +#ifndef _WIN32
   264    267         if( strcmp(z,"max-stack")==0
   265    268          || strcmp(z,"max-data")==0
   266    269          || strcmp(z,"max-as")==0
   267    270         ){
   268    271           struct rlimit x,y;
   269    272           int resource = RLIMIT_STACK;
   270    273           char *zType = "RLIMIT_STACK";
................................................................................
   287    290           setrlimit(resource, &y);
   288    291           memset(&y,0,sizeof(y));
   289    292           getrlimit(resource, &y);
   290    293           printf("%s changed from %d to %d\n", 
   291    294                  zType, (int)x.rlim_cur, (int)y.rlim_cur);
   292    295           continue;
   293    296         }
          297  +#endif /* _WIN32 */
   294    298       }
   295    299       argv[j++] = argv[i];
   296    300     }
   297    301     argv[j] = 0;
   298    302     *pArgc = j;
   299    303     return 0;
   300    304   }