Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!panews.awdpa.ibm.com!slo.awdpa.ibm.com!jsalter From: jsalter@ibmpa.awdpa.ibm.com Newsgroups: comp.unix.aix Subject: Re: I am missing something important while porting to AIX 3.1? Message-ID: <1991Feb6.174248.14923@ibmpa.awdpa.ibm.com> Date: 6 Feb 91 17:42:48 GMT References: <1991Feb6.020623.26983@lavaca.uh.edu> <1991Feb6.050344.1516@ux1.cso.uiuc.edu> Sender: news@ibmpa.awdpa.ibm.com (news id) Reply-To: jsalter@slo.awdpa.ibm.com (Jim Salter) Organization: IBM PSLOB Development, Palo Alto, CA Lines: 51 In article <1991Feb6.050344.1516@ux1.cso.uiuc.edu> andreess@mrlaxs.mrl.uiuc.edu (Marc Andreessen) writes: >In article <1991Feb6.020623.26983@lavaca.uh.edu> jet@karazm.math.uh.edu ("J. Eric Townsend") writes: >>Several times I've tried to port relatively innocuous (good word, eh?) >>code from the BSD/SunOS world to AIX 3.1 and have had a big AIX-shaped >>boot stomped all over my head. >>These are things that should be simple: patch, BSD tar, etc. patch doesn't come with the system, but it ports relatively easily. tar works just fine for me, and I transfer stuff all the time between 4.3's and 6000's. >>[...] Maybe there's a magic >>program, "bsdtoaix" that modifies generic BSD code so that cc/c89/xlc >>doesn't barf so hard. See the 'bsdcc' stanza in the BSD porting document /usr/lpp/bos/bsdport that comes with your system. It talks a LOT about this stuff. And, while you're at it, you might want to read the /usr/lpp/bos/README file which is chock-full [:-)] of interesting information. >Maybe this is self-evident, but you are compiling with -D_BSD and >then linking everything to libbsd.a in the end, aren't you? Don't forget that this has been upgraded in later releases from GOLD to also use the _BSD_INCLUDE token (for stuff that was missed earlier. They will be grouped together in later releases.) >I've compiled literally scores of more-or-less standard BSD programs >this way (including patch, etc). After _BSD is defined, quite often the >only problems remaining are declarations of malloc(), sprintf(), >and the like, which can be safely #ifndef _AIX'd out of the source code. >Also, I avoid xlc and c89 like the Black Plague. But that's another >story. Why? I don't understand this comment at all. xlc and c89 (as defined in the file /etc/xlc.cfg) just define *strict* ANSI C conformance. If your code is strictly conforming (nothing outside of the ANSI C standard) then it should compile just fine. If you believe your code is ANSI C compliant and it doesn't compile with xlc or c89, then you need to open an APAR/problem-report with IBM, or at least give us a chance to see the code. I'm sorry, but I'm tired of seeing global accusations like this without proof. >Marc Andreessen___________University of Illinois Materials Research Laboratory >Internet: andreessen@uimrl7.mrl.uiuc.edu____________Bitnet: andreessen@uiucmrl jim/jsalter IBM PSLOB, Palo Alto T465/(415)855-4427 VNET: JSALTER at AUSVMQ Internet: jsalter@slo.awdpa.ibm.com UUCP: ..!uunet!ibmsupt!jsalter PS/2 it, or DIE! :-) The ramblings above have nothing to do with Big Blue.