Demonic Software wrote:
Awesome. Builds with no problem on my x86_64 and for the most part, I got everything to build on the Mac. WRT to the Mac, I had to tweak a few things, and I am not sure what the root cause was.

Tweaks:

1) in src/plug/io/libgdbwrap/gdbwrapper.c:
added type definitions for u_short and u_int
I am not sure if this is related to the issue below, because this was fixed first. I simply added typedef statements for the required work.

fixed in head too.. Looks like u_short, u_int ,... are non-portable types, this source comes from ERESI, i will try to push this bugreport there. I just made a stupid workaround with hardcoded
#define's.
2) in global.h:
added #define __darwin__ True
The proper OS definition does not appeared to be used. The system is recognized as DARWIN, but this is not translated into __darwin__ which is used in the #if/#endif on lines 38-46 in src/cons.c. Without this modification, I was getting the msg: "error: initializer element is not constant" on line 44. This is how I was able to figure out the issue with definitions.

Well. afaik __darwin__ is deprecated..Apple decided to change it to __DARWIN, but looking at src/cons.c i see no reason why split this into darwin/linux/therest..so now the conditional is just "linux" vs "the world", so the issue is that linux is the only one which stores the stdin FILE* pointer in the TLS, this means that no pointer to stdin/stdout/stderr can be retrieved statically, and they need to be done in runtime, this is just a stupid and ugly workaround, but it works.

Last hg tip should build fine on osx, when i have some time i will rebuild it in my ipod again
to check this.
Great work guys.  I feel bad for being a freeloader.  Cheers,

dsoftware
Thanks!
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to