]> git.saurik.com Git - cycript.git/commitdiff
Attempted to port back to Linux.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 1 Nov 2009 03:23:23 +0000 (03:23 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 1 Nov 2009 03:23:23 +0000 (03:23 +0000)
Library.cpp
cycript.hpp
sig/parse.cpp

index a6e9e4ee48b048d6fafdc85e82c84d8222c15bb9..e1ef4fa969b5e3747ca5ba026a9e1e2b700ac5b1 100644 (file)
@@ -1021,7 +1021,7 @@ static void Struct_getPropertyNames(JSContextRef context, JSObjectRef object, JS
         name = elements[index].name;
 
         if (name == NULL) {
-            sprintf(number, "%lu", index);
+            sprintf(number, "%zu", index);
             name = number;
         }
 
index cc64033f883da724d0356a18414bb1a9387441d5..a1e1f022d5cff8abdc7b3170835892e64e088483 100644 (file)
 #ifndef CYCRIPT_HPP
 #define CYCRIPT_HPP
 
+#ifdef __APPLE__
 #include <JavaScriptCore/JavaScriptCore.h>
+#else
+#include <JavaScriptCore/JavaScript.h>
+#endif
 
 #include <apr_pools.h>
 #include <ffi.h>
index 05b321373a762960cc500abb8592fac9e18dacb5..0a1d26fb8d86407ebeb3be42eb77acc17f8a48ce 100644 (file)
@@ -271,7 +271,7 @@ const char *Unparse(apr_pool_t *pool, struct Type *type) {
 
         case array_P: {
             const char *value = Unparse(pool, type->data.data.type);
-            return apr_psprintf(pool, "[%lu%s]", type->data.data.size, value);
+            return apr_psprintf(pool, "[%zu%s]", type->data.data.size, value);
         } break;
 
         case pointer_P: return apr_psprintf(pool, "^%s", type->data.data.type == NULL ? "v" : Unparse(pool, type->data.data.type));