Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 1996 09:08:44 -0400 (EDT)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!freefall.cdrom.com!freebsd-hackers
Subject:   netdb.h and -traditional...
Message-ID:  <199608161308.JAA00494@lakes.water.net>

next in thread | raw e-mail | index | archive | help

While building some older (non-ANSI) sources with the -traditional
flag, I ran into the following (on 2.1.5) on line 139 of netdb.h:

const char      *hstrerror __P((int)); 

which, of course, breaks because 'const' is ANSI.

I did a quick grep(1) of /usr/include and didn't see any other
uses of 'const' for a return type... but, it was a really quick
scan...

I did see other files that were missing the __P and made similar
ANSI assumptions; but they were new files that wouldn't be #include'd
by older code... 


Although, looking at cdefs.h - I see you should be able to define
NO_ANSI_KEYWORDS to get the behaviour I'm after.

It just seems to me that 'const' as part of a visible type declaration
should be defined away for the same reason that function prototypes
are, at the same time they are.

Opinions?


	- Dave Rivers -




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608161308.JAA00494>