On 6/11/12 1:07 PM, Hugh Caley wrote:
I'm running Lion 10.7.4. I just built tn5250, but when I run it I get
Segmentation fault:11.

I got xt5250/tn5250 to work on Mac OS X by adding #include's as shown below:

--- tn5250-0.17.4/curses/cursesterm.c 2008-11-21 01:12:20.000000000 -0700
+++ cursesterm.c 2012-07-28 11:45:04.000000000 -0600
@@ -22,6 +22,9 @@
#include "tn5250-private.h"
#include "cursesterm.h"
+#ifdef __APPLE__
+#include <term.h>


--- tn5250-0.17.4/curses/tn5250.c 2008-11-21 01:12:21.000000000 -0700
+++ tn5250.c 2012-07-28 11:37:10.000000000 -0600
@@ -19,6 +19,7 @@

#include "tn5250-private.h"
+#include "cursesterm.h"

Tn5250Session *sess = NULL;
Tn5250Stream *stream = NULL;

Without these, I believe there are un-prototyped routines in the modules and the C compiler (incorrectly) uses a default prototype returning an int. On 64-bit OS's where pointers are not interchangeable with int's this causes addressing issues.

Hope this helps.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].