Stefan Manegold wrote: > On Tue, Dec 11, 2007 at 02:18:52PM +0100, Fabian Groffen wrote: >> On 07-12-2007 22:29:07 +0100, Djoerd Hiemstra wrote: >>> Here are some remarks from Tristan Pothoven here in Twente for >>> installing the stable MonetDB/XQuery on FreeBSD (FreeBSD >>> 6.2-RELEASE-p7). He did the following: >>> 1. 'make' on FreeBSD cannot cope with the wildcards in some of the >>> Makefiles. No problem if you use gmake instead. >> The latest monetdb-install.sh script uses gmake when available (such as >> on FreeBSD and Solaris). >> >>> 2. Changes in sourcefiles: >>> Package MonetDB: >>> file: monet_utils.h >>> original: #if HAVE_ALLOCA_H >>> changed to: #ifdef HAVE_ALLOCA_H >>> Package Pathfinder: >>> file: pathfinder.h >>> original: #if HAVE_ALLOCA_H >>> changed to: #ifdef HAVE_ALLOCA_H >> Indeed, gcc on FreeBSD appears to choke on this. I fixed it in the >> current branch (sorry, my FreeBSD machine is too slow and I just did >> current initially). > > If macro X is defined and equal to either 0 or 1, > > #if X > > is IMHO a valid C preprorocessor derective and should hence work fine. > In fact, in such case the semantics of > > #if X > > is obviously not the same as that of > > #ifdef X > > (Admittedly, most in most if not all cases you changed, indeed > `#ifdef X` was / should have been intended, not `#if X`.) > > What excatly did the gcc on FreeBSD complain about
FreeBSD is actually right. The HAVE_* macros are either defined (to 1, admittedly) if the feature is present, or not defined if it isn't. So you should check (and the autoconf documentation tells you this) using #if(n)def. However, there are also autoconf-generated macros that are always defined as 0 or 1. The HAVE_DECL_* macros come to mind. These have to be tested using #if (and again, the documentation tells you so). >> There are occurences of >> #if @1 >> and >> #if [EMAIL PROTECTED] >> in the M4, M5 and XQuery sources. I suspect they will fail in the same >> way (i.e. the guard may do something else than expected), but I am not >> sure what the appropriate fix there is. > > These case *might* indeed mean what they say: > > #if @1 > #if [EMAIL PROTECTED] > > with @1 / [EMAIL PROTECTED] being either 0 or 1. These are indeed correct. CMD_MOD is defined as 1 and CMD_DIV as 0. The #if [EMAIL PROTECTED] expands to one of those, and is intended to exclude not appropriate for the operation. > Stefan > >>> 3. Furthermore, it seems that the files parser.tab.h and parser.tab.c, >>> are not generated (are they generated?) correctly. Tristan took >>> them from the tarball on the monetdb cwi site. Similarly, in the >>> pftijah module with nexi.tab.c and nexi.tab.h. >> This question already has been answered by Stefan. > -- Sjoerd Mullender
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Monetdb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
