X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/8a392978b2d6e7db62cdf6d576e071d70fef9b94..1e8d80477a3e058a30c477955f1e0c56deb6e956:/Handler.cpp diff --git a/Handler.cpp b/Handler.cpp index 2a17d61..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,11 +36,9 @@ #include #endif -#include "cycript.hpp" - #include "Driver.hpp" #include "JavaScript.hpp" -#include "Parser.hpp" +#include "Syntax.hpp" #include "Pooling.hpp" struct CYExecute_ { @@ -166,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); @@ -189,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;