-/* 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 {{{ */
**/
/* }}} */
+#include "cycript.hpp"
+
#include <dlfcn.h>
#include <pthread.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
#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_;
address.sun_family = AF_UNIX;
strcpy(address.sun_path, path);
- _syscall(connect(socket, reinterpret_cast<sockaddr *>(&address), SUN_LEN(&address)));
+ _syscall(connect(socket, reinterpret_cast<sockaddr *>(&address), sizeof(address)));
CYInitializeDynamic();
CYHandleClient(socket);
if (handle == NULL) {
Dl_info info;
_assert(dladdr(reinterpret_cast<void *>(&MSmain0), &info) != 0);
+#ifdef __ANDROID__
+ handle = dlopen(info.dli_fname, 0);
+#else
handle = dlopen(info.dli_fname, RTLD_NOLOAD);
+#endif
}
return NULL;