Builiding the top of the tree on macOS I ran into a couple issues that needed manual intervention.
swigComment("--===< function pointers >===---\n");
if(offsetof(struct _XExtData, free_private) >= 0) 0
if(offsetof(struct funcs, create_image) >= 0) 0
if(offsetof(struct funcs, destroy_image) >= 0) 0
if(offsetof(struct funcs, get_pixel) >= 0) 0
if(offsetof(struct funcs, put_pixel) >= 0) 0
if(offsetof(struct funcs, sub_image) >= 0) 0
if(offsetof(struct funcs, add_pixel) >= 0) 0
Builiding the top of the tree on macOS I ran into a couple issues that needed manual intervention.
In engine/getopt.sh, there's an
#if defined(__GNU_LIBRARY)check around the proper extern declaration ofgetopt, which is incorrect; it's not true that only systems using the GNU libc need the correct declaration. Even under real gcc this fails to compile on macOS. I just removed that#ifand the#elseclause entirely.In the generated unix/x-fsi.c (and still in x-fsi-fixed.c) there are several lines in a row that are missing semicolon terminators. I'm not sure if this is a problem with the swig-forth installation or an input template, but all of these
iflines should have a trailing semicolon after the final 0: