X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/d9c911529b1480684bb8b6280410f2d09c8525a1..8b898c07529e9b3338430715caf64c915a03a550:/Handler.cpp?ds=sidebyside diff --git a/Handler.cpp b/Handler.cpp index d048d83..da458d6 100644 --- a/Handler.cpp +++ b/Handler.cpp @@ -1,5 +1,5 @@ -/* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2015 Jay Freeman (saurik) +/* Cycript - The Truly Universal Scripting Language + * Copyright (C) 2009-2016 Jay Freeman (saurik) */ /* GNU Affero General Public License, Version 3 {{{ */ @@ -19,6 +19,8 @@ **/ /* }}} */ +#include "cycript.hpp" + #include #include #include @@ -34,15 +36,11 @@ #include #endif -#include "cycript.hpp" - +#include "Driver.hpp" #include "JavaScript.hpp" -#include "Parser.hpp" +#include "Syntax.hpp" #include "Pooling.hpp" -#include "Cycript.tab.hh" -#include "Driver.hpp" - struct CYExecute_ { CYPool &pool_; const char * volatile data_; @@ -168,7 +166,7 @@ static void CYHandleSocket(const char *path) { address.sun_family = AF_UNIX; strcpy(address.sun_path, path); - _syscall(connect(socket, reinterpret_cast(&address), SUN_LEN(&address))); + _syscall(connect(socket, reinterpret_cast(&address), sizeof(address))); CYInitializeDynamic(); CYHandleClient(socket); @@ -191,7 +189,11 @@ _extern char *MSmain0(int argc, char *argv[]) { try { if (handle == NULL) { Dl_info info; _assert(dladdr(reinterpret_cast(&MSmain0), &info) != 0); +#ifdef __ANDROID__ + handle = dlopen(info.dli_fname, 0); +#else handle = dlopen(info.dli_fname, RTLD_NOLOAD); +#endif } return NULL;