From owner-cvs-src@FreeBSD.ORG Wed Sep 14 19:47:06 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FA0116A439; Wed, 14 Sep 2005 19:47:06 +0000 (GMT) (envelope-from dejan.lesjak@ijs.si) Received: from mail.ijs.si (mail.ijs.si [193.2.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFEDC43D5D; Wed, 14 Sep 2005 19:47:04 +0000 (GMT) (envelope-from dejan.lesjak@ijs.si) Received: from localhost (mail.ijs.si [193.2.4.66]) by patsy.ijs.si (Postfix) with ESMTP id 2329117B8FA; Wed, 14 Sep 2005 21:47:04 +0200 (CEST) Received: from patsy.ijs.si ([127.0.0.1]) by localhost (patsy.ijs.si [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 67767-02-9; Wed, 14 Sep 2005 21:46:58 +0200 (CEST) Received: from radagast.ijs.si (radagast.ijs.si [193.2.4.168]) by patsy.ijs.si (Postfix) with ESMTP id B494717B8E4; Wed, 14 Sep 2005 21:46:57 +0200 (CEST) Received: from radagast.ijs.si (localhost.ijs.si [127.0.0.1]) by radagast.ijs.si (Postfix) with SMTP id 31EAC1702B; Wed, 14 Sep 2005 21:46:57 +0200 (CEST) From: Dejan Lesjak To: Stefan Farfeleder , cvs-src@freebsd.org, Marcel Moolenaar Date: Wed, 14 Sep 2005 21:46:57 +0200 References: <200509140901.j8E916mL044612@repoman.freebsd.org> <20050914095217.GC59453@wombat.fafoe.narf.at> <154E8DB1-C941-4477-9FB7-BD373DC11898@xcllnt.net> <20050914165300.GG59453__19251.2678368532$1126717092$gmane$org@wombat.fafoe.narf.at> Lines: 58 User-Agent: KNode/0.9.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-Id: <20050914194657.31EAC1702B@radagast.ijs.si> X-Virus-Scanned: amavisd-new at ijs.si Cc: Subject: Re: cvs commit: src/include Makefile X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2005 19:47:06 -0000 Stefan Farfeleder wrote: > On Wed, Sep 14, 2005 at 09:30:26AM -0700, Marcel Moolenaar wrote: >> On Sep 14, 2005, at 2:52 AM, Stefan Farfeleder wrote: >> >> >> Back out 1.247. On ia64 is included from >> >>assembler source, >> >> the prototype broke buildword. >> > >> >I waver between guarding the prototype with #ifndef __ASSEMBLER__ and >> >moving it to another header, eg. . Opinions? >> >> I would go with #ifndef __ASSEMBLER__. I think the prototype is >> essentially in the right header. I did test your patch and it does >> the trick... > > That would require fixing xorg-server's usage of the header too. I > don't know how difficult this is. The trouble is rather in imake. To enable/disable some stuff imake grabs __FreeBSD_version (basically similarly that ports system uses OSVERSION variable). Since imake is basically cpp all it needs to do here is include osreldate.h and it gets the proper #define. Imake doesn't care much if there's a prototype for getosreldate there. It just blindly includes it in generated Makefile. make(1) is the one that then gets confused :) Example from x11-clocks/xtimer: ===> Configuring for xtimer-0.8089 imake -DUseInstalled -I/usr/X11R6/lib/X11/config make Makefiles "Makefile", line 33: Need an operator make: fatal errors encountered -- cannot continue *** Error code 1 The part of imake configuration (file FreeBSD.cf) that includes osreldate.h looks like this: #ifndef OSRelVersion /* Include this to get finer-grained information about the OS version */ #include "/usr/include/osreldate.h" #define OSRelVersion __FreeBSD_version #endif Now if the prototype would be guarded with #ifndef __ASSEMBLER__, we could change that part to something like: #ifndef OSRelVersion /* Include this to get finer-grained information about the OS version */ #define __ASSEMBLER__ #include "/usr/include/osreldate.h" #undef __ASSEMBLER__ #define OSRelVersion __FreeBSD_version #endif which seems a bit silly but it works :) Dejan