Re: Tn5250 compile under IBM Aix 5.3

"Dennis Lovelady" <iseries-HF96MFG82JhWk0Htik3J/[email protected]>
Newsgroups gmane.comp.emulators.tn5250
Message-ID <000c01caf2fa$5aba3920$102eab60$@com>
I can only come up with one scenario that might produce the "warning:
incompatible implicit declaration of built-in function malloc" error like
this on AIX 5.3, given that <stdlib.h> is included in the source. That would
be the situation where some piece of code (perhaps a macro) uses the malloc
function before <stdlib.h> is included.  See the following example:

void *myFunc(int size) {
    void *ptr ;
    ptr = malloc(size) ;
    }

#include <stdlib.h>

int main(int argc, char *argv[]) {
    char *dummy ;
    dummy = myFunc(1024) ;
    }

This could be innocently manifest with code that would look like this:

#include "myFunc.h"
#include <stdlib.h>

(where myFunc.h incorrectly contains the code rather than just a prototype.)

Unfortunately, I have yet to prove this theory on an AIX 5.3 system.  Maybe
Alberto or Mark could?

Is it possible that repositioning the #include would provide benefit?  (I
have yet to see the source.)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"STOP: DRIVE SIDEWAYS!"
        -- detour sign in Kyushi, Japan 

------


Harumph! I'll have a look this PM. There has to be a simple explanation.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Behind every successful man stands a surprised mother-in-law."
-- Hubert Humphrey

    -----Original Message-----
    From: linux5250-bounces@xxxxxxxxxxxx [mailto:linux5250-
    bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
    Sent: Thursday, May 13, 2010 1:08 PM
    To: Linux 5250 Development Project
    Subject: Re: [LINUX5250] Tn5250 compile under IBM Aix 5.3

    Yes, stdlib.h is included by tn5250-private.h, which in turn is
    included
    throughout the source of tn5250.

-- 
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.