🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1351

Re: MSL C.PPC.Lib (pro 5 -> pro 6)

#1351
From: David Williss
Date: Tue, 31 Oct 2000 15:18
43 lines
3024 bytes
"MWRon" <mwron@metrowerks.com> wrote in message
news:mwron-3010001507480001@c243286-a.bcreek1.mi.home.com...
> In article <8tk79f$2lr$1@mserv2.dl.ac.uk>, "Gareth J Baker"
> <G.J.Baker@dl.ac.uk> wrote:
>
> >There has been a change in fcntl.mac.h in MSL from pro 5 to pro 6. the
> >definition of 'open' in pro 5 is now  '_open' (with an underscore) in pro
6.
> >A definition of 'open' is inlined to _open but only within a #ifdef POSIX
> >construct.
> >
> >Does anyone know any possible reason for this?
>
> First you shouldn't have been using fcntl.mac.h in the first place for
> open(), you should have used the POSIX standard header.   If you had you
> would not have noticed any change.   Metrowerks standard libraries include
> the source and the header files so that users can use them but you should
> not expect any non standard header to be unchanging, that is why we use
> these variations.
>

I don't think he was saying he _was_ using fcntl.mac.h.  If you include
fcntl.h
(the public one) with the right things defined, _it_ ends up including
fcntl.h

In fact, I see the problem he's talking about in the normal fcntl.h, not
just
the private one.  It proptotypes _open, _creat,  and _fcntl, then defines
the correct names without underscores as inlines, but ONLY if POSIX
is defined.  If you don't define POSIX, you don't get them at all.

> Now, if you choose to use the function open in your code you are free to
> do so since it is not an ANSI/ISO function.  However if you want to use
> the POSIX function (which we allow by default) you can use that too.  You
> now only have to change the configuration file and it is fixed for the
> entire library.
>

Wait, you're saing open() _isn't_ ANSI?   Hmmmm... Sure enough.  Acording
to the man page on my Linux system, open() conforms to SVr4, SVID,
POSIX, X/OPEN and BSD 4.3.
Technical Details
Message-ID: <TmBL5.1562$1E.121808@nntp1.onemain.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!nntp1.onemain.com.POSTED!not-for-mail
References: <8tk79f$2lr$1@mserv2.dl.ac.uk> <mwron-3010001507480001@c243286-a.bcreek1.mi.home.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,9cbd3180af8f803b
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,9cbd3180af8f803b
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2000-10-31 07:18:12 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!nntp1.onemain.com.POSTED!not-for-mail
From: "David Williss" <dwilliss@microimages.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
References: <8tk79f$2lr$1@mserv2.dl.ac.uk> <mwron-3010001507480001@c243286-a.bcreek1.mi.home.com>
Subject: Re: MSL C.PPC.Lib  (pro 5 -> pro 6)
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <TmBL5.1562$1E.121808@nntp1.onemain.com>
Date: Tue, 31 Oct 2000 09:18:06 -0600
NNTP-Posting-Host: 207.232.84.58
X-Complaints-To: abuse@onemain.com
X-Trace: nntp1.onemain.com 973005363 207.232.84.58 (Tue, 31 Oct 2000 10:16:03 EST)
NNTP-Posting-Date: Tue, 31 Oct 2000 10:16:03 EST