Date: Wed, 14 Sep 2005 21:46:57 +0200 From: Dejan Lesjak <dejan.lesjak@ijs.si> To: Stefan Farfeleder <stefanf@FreeBSD.org>, cvs-src@freebsd.org, Marcel Moolenaar <marcel@xcllnt.net> Subject: Re: cvs commit: src/include Makefile Message-ID: <20050914194657.31EAC1702B@radagast.ijs.si> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <osreldate.h> 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. <unistd.h>. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050914194657.31EAC1702B>