From owner-freebsd-current Thu Oct 3 09:04:34 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA05110 for current-outgoing; Thu, 3 Oct 1996 09:04:34 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA05103 for ; Thu, 3 Oct 1996 09:04:29 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id CAA20441; Fri, 4 Oct 1996 02:00:33 +1000 Date: Fri, 4 Oct 1996 02:00:33 +1000 From: Bruce Evans Message-Id: <199610031600.CAA20441@godzilla.zeta.org.au> To: ache@nagual.ru, bde@zeta.org.au Subject: Re: 'howmany' cruft Cc: current@FreeBSD.org Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >What I find in >sys/types.h: >#ifndef howmany >#define howmany(x, y) (((x) + ((y) - 1)) / (y)) >#endif >I find it because netpbm redifines it and gcc produce warning on this place. >It looks very suspicious for me (I mean ANSI namespace violation). >Do we really need it? Can we rename it to _howmany at least? Lite2 changed the whitespace in it and netpbm presumably has the old version. Grep shows that it is used in a few places in /usr/src/*bin (subdirs not checked): ls, dump, fsck, newfs, restore, du, systat and diskpart. These would be easy to fix, but I'm worried about ports. Other macro pollution in found by inspecting the output of cc -E -dM: ntohl, BYTE_ORDER_LITTLE_ENDIAN, ntohs, LITTLE_ENDIAN, FD_SET, HTONL, HTONS, NTOHL, NTOHS, minor, PDP_ENDIAN, NFDBITS, FD_ZERO, NBBY, FD_COPY, FD_ISSET, makedev, FD_SETSIZE, FD_CLR, major, htonl, htons, BIG_ENDIAN. Other pollution in found by inspecting the output of cc -E -P | grep -v '^[ ]*$': physaddr, u_char, u_short, u_int, u_long, ushort, uint, lseek, fd_mask, fd_set. Pollution that is still present if _POSIX_SOURCE is defined: Everything from (*ENDIAN*, ntoh*, NTOH*); lseek. Bruce