Show
Ignore:
Timestamp:
09/16/09 17:18:42 (3 years ago)
Author:
leo
Message:

built-in extension-functions

Location:
XerialJ/trunk/sqlite-jdbc/sqlitejdbc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • XerialJ/trunk/sqlite-jdbc/sqlitejdbc/Makefile.nested

    r3591 r3593  
    11include Makefile.common 
    22 
    3 nestedvm_version := 2007-06-30 
     3nestedvm_version := 2009-08-09 
    44nestedvm := nestedvm-$(nestedvm_version) 
    55 
     
    3232        @mkdir -p dl 
    3333        cp ../archive/$(nestedvm).tgz $@ 
    34 #       curl -odl/$(nestedvm).tgz http://files.zentus.com/sqlitejdbc/$(nestedvm).tgz 
     34#       curl -odl/$(nestedvm).tgz http://nestedvm.ibex.org/dist/$(nestedvm).tgz 
    3535 
    3636dl/$(sqlite)-amal.zip: 
     
    5050        perl -pi -e "s/sqlite3_api;/sqlite3_api = 0;/g" \ 
    5151            build/$(sqlite)-nestedvm/sqlite3ext.h 
    52  
    5352        # we need a dummy main 
    5453        echo 'int main() { return 0; }' >> build/$(sqlite)-nestedvm/sqlite3.c 
     
    7069                sqlite3.c; \ 
    7170        $$CC -c $$CFLAGS -o NestedDB.o Nested*.c) 
    72  
    7371        ./$(nestedvm)/upstream/install/bin/mips-unknown-elf-gcc \ 
    74                 -march=mips1 --static -lc \ 
     72                -march=mips1 --static \ 
    7573                -o $@ build/$(sqlite)-nestedvm/sqlite3.o \ 
    76                               build/$(sqlite)-nestedvm/NestedDB.o 
     74                              build/$(sqlite)-nestedvm/NestedDB.o -lm -lc 
    7775 
    7876build/org/sqlite/SQLite.class: build/SQLite.mips 
  • XerialJ/trunk/sqlite-jdbc/sqlitejdbc/ext/extension-functions.c

    r3588 r3593  
    9999//#include "config.h" 
    100100 
    101 #define COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE 1 
     101//#define COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE 1 
    102102#define HAVE_ACOSH 1 
    103103#define HAVE_ASINH 1 
     
    131131#define _MAP_H_ 
    132132 
    133 #include <stdint.h> 
     133//#include <stdint.h> 
    134134 
    135135/* 
     
    139139 
    140140typedef int(*cmp_func)(const void *, const void *); 
    141 typedef void(*map_iterator)(void*, int64_t, void*); 
     141typedef void(*map_iterator)(void*, sqlite_int64, void*); 
    142142 
    143143typedef struct node{ 
     
    145145  struct node *r; 
    146146  void* data; 
    147   int64_t count; 
     147  sqlite_int64 count; 
    148148} node; 
    149149 
     
    18831883 
    18841884int int_cmp(const void *a, const void *b){ 
    1885   int64_t aa = *(int64_t *)(a); 
    1886   int64_t bb = *(int64_t *)(b); 
     1885  sqlite_int64 aa = *(sqlite_int64 *)(a); 
     1886  sqlite_int64 bb = *(sqlite_int64 *)(b); 
    18871887  /* printf("cmp %d <=> %d\n",aa,bb); */ 
    18881888  if(aa==bb) 
     
    19061906} 
    19071907 
    1908 void print_elem(void *e, int64_t c, void* p){ 
     1908void print_elem(void *e, sqlite_int64 c, void* p){ 
    19091909  int ee = *(int*)(e); 
    19101910  printf("%d => %lld\n", ee,c);