Date: Sun, 15 Feb 1998 13:17:01 +0200 (IST) From: Eli Zaretskii To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: Re: Suggestion: Portability section for libc docs In-Reply-To: <199802141847.NAA24062@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.