*BSD News Article 16460


Return to BSD News archive

Xref: sserve comp.os.386bsd.development:792 comp.os.386bsd.bugs:809
Newsgroups: comp.os.386bsd.development,comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!uknet!pavo.csi.cam.ac.uk!camcus!pc123
From: pc123@cus.cam.ac.uk (Pete Chown)
Subject: Thanks for your support! (And some fixes to include files.)
To: hasty@netcom.com,wjolitz@soda.berkeley.edu,cgd@postgres.berkeley.edu,netbsd-bugs@sun-lamp.cs.berkeley.edu
Message-ID: <PC123.93May24220828@bootes.cus.cam.ac.uk>
Sender: news@infodev.cam.ac.uk (USENET news)
Nntp-Posting-Host: bootes.cus.cam.ac.uk
Organization: U of Cambridge, England
Date: Mon, 24 May 1993 21:08:32 GMT
Lines: 99

Thanks to everyone who sent me messages expressing their support after
the flames got too much the other day.  I have now relented...

First the easy bit - my include file patches.  You may want to pick
and choose a bit which ones you install.  Many of them are there to
support proper interworking with libg++; unfortunately they don't
always achieve this in the nicest possible way, since it has
occasionally been necessary to remove, say, a const, for no good
reason except that it isn't in the C++ header files.  Really, the C++
header files should be fixed, but it was easier to do it this way.  I
will give you permission to flame me for this :-) as it is not nice.

What I would suggest is that people wanting a quick hack to get libg++
working apply them, but the people maintaining the master sources
don't.  However, one patch should definitely be applied - the one to
ctype.h.  As distributed, ctype.h doesn't have correctly functioning
tolower() and toupper() functions, since the macros don't return
characters unchanged that don't need their case changing.  Proper
versions are defined in the libc, and my patch simply causes these to
be used.  Okay, here is the diff (the article continues after it):

----------snip----------snip----------snip----------snip----------
diff +recursive inc1/ctype.h /usr/include/ctype.h
62,63c62,77
< #define       toupper(c)      ((c) - 'a' + 'A')
< #define       tolower(c)      ((c) - 'A' + 'a')
---
> 
> /*
>  * toupper and tolower were defined as follows:
>  *
>  *    #define         toupper(c)      ((c) - 'a' + 'A')
>  *    #define         tolower(c)      ((c) - 'A' + 'a')
>  *
>  * This is wrong, since they are supposed to return the argument unchanged if
>  * it is not a lower case letter, or an upper case letter respectively.  Note
>  * that they cannot be defined correctly as macros, since they would evaluate
>  * their arguments twice.
>  */
> 
> extern int toupper(int c);
> extern int tolower(int c);
> 
diff +recursive inc1/netinet/in.h /usr/include/netinet/in.h
35a36,38
> #ifndef _NETINET_IN_H
> #define _NETINET_IN_H
> 
150a154,155
> #endif
> 
diff +recursive inc1/regex.h /usr/include/regex.h
469,470c469,470
< extern char *re_comp _RE_ARGS ((const char *));
< extern int re_exec _RE_ARGS ((const char *));
---
> extern char *re_comp _RE_ARGS ((char *));
> extern int re_exec _RE_ARGS ((char *));
diff +recursive inc1/stdlib.h /usr/include/stdlib.h
73a74,77
> 
> #ifdef __GNUC__
> volatile void exit __P((int));
> #else
74a79
> #endif
diff +recursive inc1/sys/socket.h /usr/include/sys/socket.h
35a36,38
> #ifndef _SYS_SOCKET_H
> #define _SYS_SOCKET_H
> 
260a264,265
> 
> #endif
diff +recursive inc1/unistd.h /usr/include/unistd.h
148,149c148,149
< char  *re_comp __P((const char *));
< int    re_exec __P((const char *));
---
> char  *re_comp __P((char *));
> int    re_exec __P((char *));
----------snip----------snip----------snip----------snip----------

These patches are against "vanilla" NetBSD-0.8.

Now the more difficult thing.  My shared library scheme will be used
in 0.2, but it is not the only shared library scheme which is being
worked on.  Some of the more constructive mail that I received has
rather changed my opinion, and I think that it would probably be
better to use a different scheme in the long term.

So my suggestion is this - we should see this shared library package
as an interim measure, that can be distributed with 0.2.  The
alternative would, after all, be no shared library implementation at
all.  But when a better one appears, I suggest we adopt it.
--
---------------------------------------------+ "A tight hat can be stretched.
Pete Chown, pc123@phx.cam.ac.uk (Internet)   |  First damp the head with steam
            pc123@uk.ac.cam.phx (Janet :-)  -+  from a boiling kettle."