www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/15/06:17:12

Date: Sun, 15 Feb 1998 13:17:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Suggestion: Portability section for libc docs
In-Reply-To: <199802141847.NAA24062@delorie.com>
Message-ID: <Pine.SUN.3.91.980215131608.27889G-100000@is>
MIME-Version: 1.0

On Sat, 14 Feb 1998, DJ Delorie wrote:

> Ha!  There is a *lot* of difference.  For example, SunOS free() takes
> a char* not a void*, so you can't pass it just any pointer, and you
> can't even cast to void* to make it work!  You have to cast to char*.

And if the above is not enough, consider this: SunOS `sprintf' returns
a char*, not an int!  (They return a pointer to the first argument.)

At one point this caused me to walk through all the system
headers ``fixed'' by GCC on a Sun and correct these snafus (by
comparing the prototypes with the system man pages), so I could have
prototypes *and* write programs that don't crash.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019