Re: Tn5250 compile under IBM Aix 5.3
"Alberto" <a.ernestini-UVFfO7pX/[email protected]>
| Newsgroups | gmane.comp.emulators.tn5250 |
|---|---|
| Organization | midrange.com |
| Message-ID | <[email protected]> |
Hi again! I've updated and configured again my PASE on the Iseries (V5R4M0) with GCC 4.0.0 (got from Yip) So , compiling TN5250 i am having the same problems with snprintf etc..etc.. as shown before from James Rich. I will try to find GCC 4.1.1 binaries, and then i will try again to compile it. There are any extra steps to follow? As i've already told it could be really interesting to have it working on the Iseries PASE :-) Ciao. ALberto. "Scott Klement" <[email protected]> ha scritto nel messaggio news:mailman.28056.1273859786.2580.linux5250-Zwy7GipZuJitq2lpoERdew@public.gmane.org > hi James, > >> My changes aren't exactly huge, so it probably doesn't matter which >> method we use. I figured people would rather keep the structure >> intact. > > Seems to me, the problem is that we used pointers in our structure that > were the same name as the system APIs (accept and connect). When the > macro runs, it renames accept to naccept and connect to nconnect, and then > our code doesn't work anymore. > > How else would you fix that? If you disable the macro, then it's calling > the wrong system API, right? Otherwise, you'd have to be careful to have > it enabled in some places and disabled in other places... which seems a > lot more complicated than renaming the pointers. > > >> conf.c: In function 'tn5250_config_replacedata': >> conf.c:716: warning: incompatible implicit declaration of built-in >> function 'snprintf' > > Hmm... I didn't get any snprintf, strncpy, strlen, strcpy or vsyslog > errors. > > I did get this malloc one that you also describe: > >> ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc >> >> Do you have any of these errors? Did you pass any options to >> ./configure? >> Do you have the following line in config.log or config.h: >> >> #define malloc rpl_malloc >> > > This appears to be caused by the fact that the AIX malloc() function is > not 100% compliant with the GNU malloc function. So autoconf creates that > macro to rename malloc to rpl_malloc with the anticipation that we (the > tn5250 project) will provide a function called rpl_malloc() that replaces > malloc() to make it GNU compatible. > > As far as I can tell, the only difference between the GNU malloc() and the > AIX one is what happens when you try to call it as malloc(0). And tn5250 > never does that -- so the difference doesn't matter to us. > > So I just commented out that macro in config.h. > > >> >> Maybe getpwuid() isn't working as expected? >> > > No... it turns out my problem with .tn5250rc (which, I'm ashamed to say, > took me _hours_ to figure out) was due to the fact that my .tn5250rc was > in EBCDIC and of course PASE programs only understand ASCII. > > But, tn5250 was reporting a spurious error of "file not found" instead of > telling me the actual problem. So... it took longer than it should've to > discover. > > But at this point, I _do_ have tn5250 running successfully in PASE. > Well... sort of, anyway. It doesn't seem to accept any keyboard input, > and I don't know why. But it doesn't give me errors, and it displays the > sign-on screen without problems. > > I'm running GCC 4.1.1 compiled for AIX 5.2. I don't remember exactly > where I got it, I've had it on i for years and years.. I probably > originally got it from UCLA's AIXPDSLIB. -- This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/linux5250 or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.