• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fdopen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fdopen


  • Subject: Re: Fdopen
  • From: Jeff Ray <email@hidden>
  • Date: Mon, 21 Jul 2008 14:24:24 -0700
  • Thread-topic: Fdopen

On 7/21/08 1:09 PM, "George Warner" <email@hidden> wrote:

> On Fri, 18 Jul 2008 13:19:23 -0700, Jeff Ray <email@hidden> wrote:
>
>> I'm porting an old CFM (Codewarrior) program to MachO (Xcode), and I've hit
>> a hard stop.
>>
>> The program makes a call to fdopen().  The call fails (return NULL), and the
>> man page for fdopen says I can get the error from errno.  However, errno is
>> 0.
>>
>> Is there something strange about fdopen() or errno under Xcode (or OSX)?
>
> It's probably more like there's something strange" about old CFM (MWCW)
> programs using (not-so-standard)stdio. Can you show us a snibblet of the
> code you're using?

Ah, I found it last night.  The short version (in case it's useful to anyone
else):

Original author was using a modified copy of zlib, which was so old it
predated OSX.  The ifdef's were such that if (mac && ! MW), fdopen() was
defined as NULL.  Thus FILE *stream = fdopen() returned NULL, and I only
stumbled over the cause by chance.

Anyway, thanks to all who replied!

-jrr

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >re: Fdopen (From: George Warner <email@hidden>)

  • Prev by Date: Re: Error codes
  • Next by Date: Re: Error codes
  • Previous by thread: re: Fdopen
  • Next by thread: NSPopUpButton style question ... "Push" v.s. "Round Textured"
  • Index(es):
    • Date
    • Thread