From owner-freebsd-ports Wed Feb 5 09:46:57 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA17671 for ports-outgoing; Wed, 5 Feb 1997 09:46:57 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA17497; Wed, 5 Feb 1997 09:46:45 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id EAA12664; Thu, 6 Feb 1997 04:45:24 +1100 Date: Thu, 6 Feb 1997 04:45:24 +1100 From: Bruce Evans Message-Id: <199702051745.EAA12664@godzilla.zeta.org.au> To: imp@village.org, obrien@NUXI.com Subject: Re: conditionally including Cc: freebsd-ports@FreeBSD.ORG, hackers@FreeBSD.ORG Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Most of the examples that you sighted can be handled better by other >means. Don't declare sys_errlist at all, rather use strerror() or >#include (which is fairly standard). Don't use hard wired strerror() doesn't exist on old systems. >Also, as time moves forward, some new systems will adopt parts of the >4.4 tree. Do you really want to have things like: > >#if defined(__bsd44__) || (defined(SOLARIS) && SOLARIS >= 207) ... NOOOO! :-) >Many of the ports have 2-3 lines of ifdefs to include stdlib.h, when >instead they should have a single #ifdef __STDC__ in its place. This is wrong. __STDC__ has very little to do with the existence of standard headers. It has more to do with the ANSI conformance of the current invocation of the compiler. E.g., it is not defined for `gcc -traditional', but running the compiler with different flags does not make standard headers go away. I think we should just use `#ifdef __FreeBSD__' and in ports. Original authors should use a better method to suit themselves. Bruce