toplev.c

Klaus Kaempf kkaempf@progis.de
Tue Jan 20 02:21:00 GMT 1998


> 
> >   > In toplev.c I read:
> >   > 
> >   > #ifdef __alpha
> >   > extern char *sbrk ();
> >   > #endif
> >   > 
> >   > Now, this prototype is needed not only for alpha, but for all 64bit
> >   > platforms which have sizeof(void *) > sizeof(int).
> 
> SUSv2 says that sbrk is a void*, not a char *.

And so does DEC C on openVMS/Alpha. A patch for this was submitted by me
last year, I wonder where it went ...

> 
> 
> Sun Jan 18 15:26:21 1998  Robert Lipe  (robertl@dgii.com)
> 	* toplev.c (sbrk): get prototype from <unistd.h> when
> 	available.
> 

This doesn't work for DEC C on openVMS/Alpha since digital put the prototype
in <stdlib.h>. So I'd supposed adding

#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif

would help a lot on VMS and shouldn't harm other systems.

Klaus
-- 
proGIS Software                 E-Mail: kkaempf@progis.de
Dipl.-Inform. Klaus K"ampf      Fax:    0241-47067-29
Jakobstr. 117                   Voice:  0241-47067-11
D-52064 Aachen                  WWW:	http://www.progis.de




More information about the Gcc mailing list