From 272a0dd43f5dca04b637d04f71df8e34a0c76aae Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 1 Nov 2009 03:23:23 +0000 Subject: [PATCH] Attempted to port back to Linux. --- Library.cpp | 2 +- cycript.hpp | 4 ++++ sig/parse.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Library.cpp b/Library.cpp index a6e9e4e..e1ef4fa 100644 --- a/Library.cpp +++ b/Library.cpp @@ -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; } diff --git a/cycript.hpp b/cycript.hpp index cc64033..a1e1f02 100644 --- a/cycript.hpp +++ b/cycript.hpp @@ -40,7 +40,11 @@ #ifndef CYCRIPT_HPP #define CYCRIPT_HPP +#ifdef __APPLE__ #include +#else +#include +#endif #include #include diff --git a/sig/parse.cpp b/sig/parse.cpp index 05b3213..0a1d26f 100644 --- a/sig/parse.cpp +++ b/sig/parse.cpp @@ -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)); -- 2.45.2