[comp.os.minix] CONST, VOIDSTAR etc

ast@cs.vu.nl (Andy Tanenbaum) (07/16/89)

It has been brought to my attention (by the C compiler) that quite a few
library routines contain CONST, VOIDSTAR, SIZET etc.  Are these part of the
ANSI C standard?  Are they supposed to be defined in some header file?
Should I delete them all?  

Andy Tanenbaum

hinton@netcom.UUCP (Greg Hinton) (07/17/89)

In article <2887@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>
>It has been brought to my attention (by the C compiler) that quite a few
>library routines contain CONST, VOIDSTAR, SIZET etc.  Are these part of the
>ANSI C standard?  Are they supposed to be defined in some header file?
>Should I delete them all?  
>
>Andy Tanenbaum

These are in Henry Spencer's ANSI string functions which were included with
version 1.4a.  It's an attempt to increase portability & is explained in
the file string.h.proto.  I personally added the following #define's to that
file & renamed it to /usr/include/string.h:

#define CONST		/* const not supported by compiler */
#define SIZET       int
#define VOIDSTAR    char *

Andy, does this flurry of recompilation foreshadow an imminent posting of
"goodies" to the net?


-- 
---------------------------------------------------------
Greg Hinton
INET: hinton@netcom.uucp
UUCP: ...!uunet!apple!netcom!hinton

ast@cs.vu.nl (Andy Tanenbaum) (07/17/89)

In article <1807@netcom.UUCP> hinton@netcom.UUCP (Greg Hinton) writes:
>Andy, does this flurry of recompilation foreshadow an imminent posting of
>"goodies" to the net?

Not imminent.  I am waiting for the copyeditor to hack away on the manuscript
of Structured Computer Organization, 3rd ed., so I have about a week of
free time.  I decided to use it to go over the stuff I have been accumulating.

I will be away from Amsterdam starting July 24 for about 4 weeks.  When I
get back I'll get back to SCO 3rd ed.  By then Bruce Evans should be
getting close with the second release of protected mode, which I want to look
at before its being posted.  Finally, when all that is done, I may begin
posting 1.4b, which will be Bruce's protected mode kernel plus the 1.4a
utlities + numerous new utilities from the net, bug fixes, etc.  When all that
is done, I'll start on POSIX.  I estimate that to be around October/November.

Andy Tanenbaum (ast@cs.vu.nl)

henry@utzoo.uucp (Henry Spencer) (07/18/89)

In article <2887@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>It has been brought to my attention (by the C compiler) that quite a few
>library routines contain CONST, VOIDSTAR, SIZET etc.  Are these part of the
>ANSI C standard?  Are they supposed to be defined in some header file?

Unless other people have picked up some of my bad habits :-), the only
place those are used is in my string functions, with definitions supplied
by my header file.

At some point I will produce a revised version of my functions to match the
final X3J11 draft.  I will probably try to do something a bit more elegant
about CONST et al.
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu