*BSD News Article 5667


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!bruce.cs.monash.edu.au!monu6!escargot!minyos.xx.rmit.OZ.AU!rcskb
From: rcskb@minyos.xx.rmit.oz.au (Kendall Bennett)
Newsgroups: comp.unix.bsd
Subject: Re: 386BSD's non-standard C library
Date: 27 Sep 92 03:51:03 GMT
Organization: RMIT Computer Centre
Lines: 33
Message-ID: <rcskb.717565863@minyos.xx.rmit.OZ.AU>
References: <1992Sep24.031603.21009@minyos.xx.rmit.oz.au> <wutcd.717452137@hadrian>
NNTP-Posting-Host: minyos.xx.rmit.oz.au

wutcd@chemnitz.guug.de (Joerg Wunsch) writes:

>Oops, Kendall is quiet right with his remarks. Of course, the existing
>versions of tolower()/toupper() aren't right. The macros may be omitted,
>(does ANSI really state there must be _macros_ for this???), but the

Not directly when it talks about <ctype.h>, but in section 7.1.7 when it 
talks about 'Use of Library functions':

    Any function declared in a header may be additionally implemented
    as a macro defined in the header ... The user of #undef to 
    remove any macro definition will also ensure that that an actual
    function is referred to.

So no, it doesn't say that you should do this with macros, but if you
do you _must_ provided a functional equivalent (so you can take the
address of it), and the header file _must_ declare this function. I 
dont remember seeing the function definitions in the header file...

>If i have half an hour left, i'll post the diff's - all the other people
>surely will make this themself.

Actually, there is a patch in Terry Lambert's patchkit Alpha-3 that fixes
this...

+------------------------------------------+-------------------------------+
| Kendall Bennett                          | Internet:                     |
| RMIT Advanced Computer Graphics Centre   | kjb@citri.edu.au              |
| CITRI Building, 723 Swanston Street      | rcskb@minyos.xx.rmit.oz.au    |
| Carlton Victoria 3053 AUSTRALIA.         |                               | 
+------------------------------------------+-------------------------------+
| CoSysop (Bossman), PC Connection Australia:               +61 3 688 0909 |
+--------------------------------------------------------------------------+