🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6662

Help. malloc() and SAS/C 5.10

#6662
From: Richard Alan Gerber
Date: Thu, 15 Nov 1990 16:42
25 lines
1441 bytes
Just when I think I'm beginning to get a glimmer of understanding concerning the
C language, I realize I know nothing at all:

I'm trying to port some NCSA HDF software to the Amiga. One header file
defines:
char *malloc();

When I try to use that header file as well as stdlib.h from SAS/C 5.10,
I get an external item mismatch error.

So I look in stdlib.h. There I see:
extern void *malloc __ARGS((unsigned));

What's going on? What is this trying to tell me that malloc returns? It has to
return a pointer to a memory location, right? I must be missing something.
Perhaps this declaration aligns the memory so you can cast the pointer to any
pointer type? Still, the manual says it returns a char *.

SAS tech support says
that whatever's in the include file is correct and the manual is most likely
wrong.

Totally lost,
Richard Gerber
gerber@rigel.astro.uiuc.edu
Technical Details
Message-ID: <1990Nov15.164228.20119@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!think.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!ragg0270

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!think.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!ragg0270
From: ragg0270@uxa.cso.uiuc.edu (Richard Alan Gerber)
Newsgroups: comp.sys.amiga.tech
Subject: Help. malloc() and SAS/C 5.10
Summary: What is malloc()'s correct type?
Keywords: SAS/C, malloc()
Message-ID: <1990Nov15.164228.20119@ux1.cso.uiuc.edu>
Date: 15 Nov 90 16:42:28 GMT
Sender: news@ux1.cso.uiuc.edu (News)
Organization: University of Illinois at Urbana
Lines: 25