Further tweaks #2
authorJerome St-Louis <jerome@ecere.com>
Fri, 11 Mar 2016 22:14:11 +0000 (17:14 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sat, 11 Jun 2016 07:07:10 +0000 (03:07 -0400)
deps/zlib-1.2.8/gzlib.c
deps/zlib-1.2.8/gzread.c
deps/zlib-1.2.8/gzwrite.c
eda/drivers/sqlite/EDASQLite.ec

index fae202e..4880433 100644 (file)
@@ -5,6 +5,8 @@
 
 #include "gzguts.h"
 
+#include <unistd.h>
+
 #if defined(_WIN32) && !defined(__BORLANDC__)
 #  define LSEEK _lseeki64
 #else
index bf4538e..1f526ba 100644 (file)
@@ -3,6 +3,8 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
+#include <unistd.h>
+
 #include "gzguts.h"
 
 /* Local functions */
index aa767fb..23d7cf3 100644 (file)
@@ -3,6 +3,8 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
+#include <unistd.h>
+
 #include "gzguts.h"
 
 /* Local functions */
index 2757a6e..81402d7 100644 (file)
@@ -440,6 +440,7 @@ class SQLiteDatabase : Database
    bool CreateCustomFunction(const char * name, SQLCustomFunction customFunction)
    {
       bool result = false;
+#if !defined(__EMSCRIPTEN__)
       Class cfClass = customFunction._class;
       customFunction.method = eClass_FindMethod(cfClass, "function", cfClass.module);
       if(customFunction.method)
@@ -509,6 +510,7 @@ class SQLiteDatabase : Database
             result = sqlite3_create_function(db, name, customFunction.args.count, SQLITE_UTF8, customFunction, SQLiteFunctionProcessor, null, null) == SQLITE_OK;
          }
       }
+#endif
       return result;
    }
 }
@@ -519,6 +521,7 @@ __attribute__((unused)) static Iterator dummy; // TOFIX: forward struct declarat
 
 public ffi_type * FFIGetType(Class type, bool structByValue)
 {
+#if !defined(__EMSCRIPTEN__)
    if(type)
       switch(type.type)
       {
@@ -572,12 +575,14 @@ public ffi_type * FFIGetType(Class type, bool structByValue)
       }
    else
       return &ffi_type_void;
+#endif
    return null;
 }
 
 static SerialBuffer staticBuffer { };
 void SQLiteFunctionProcessor(sqlite3_context* context, int n, sqlite3_value** values)
 {
+#if !defined(__EMSCRIPTEN__)
    SQLCustomFunction sqlFunction = sqlite3_user_data(context);
 
    /*  // Simple 1 pointer param returning a string
@@ -802,6 +807,7 @@ void SQLiteFunctionProcessor(sqlite3_context* context, int n, sqlite3_value** va
       delete data;
    }
    delete args;
+#endif
 }
 
 class SQLiteTable : Table