Date: Thu, 9 Jan 1997 10:26:28 -0500 (EST) From: Chuck Robey <chuckr@glue.umd.edu> To: "David O'Brien" <deobrien@ucdavis.edu> Cc: ports@freebsd.org Subject: Re: Niklas Hallqvist: archivers/hpack.non-usa.only Message-ID: <Pine.OSF.3.95.970109102217.7731A-100000@packet.eng.umd.edu> In-Reply-To: <199701090651.WAA20078@rocky.ucdavis.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Jan 1997, David O'Brien wrote: > > > So, my proprosal is for each of us to add __44bsd__ to our list of > > > predefined macros. If this is not liked, then hell, lets add BSD with the > > > right contstant to our cpp. > > > > David .... can't we just have an if exists to detect sys/param.h, then > > something like this in the makefile > > > > .if exists /usr/include/sys/param.h > > CFLAGS+=-DHAVE_PARAM_H > > .endif > > > > and in the source file > > > > #ifdef HAVE_PARAM_H > > #include <sys/param.h> > > #endif > > > > and then below do the #ifdefs based on BSD4_4 > > Yes, generally that should work. But occationally, I've hit ports that > play gratious games with CFLAGS and other vars to generate what ever they > put on the command line with cc. > > Also, I like solutions that don't rely so much on our make. I actually > try to send patches back to authors. So I need a solution that is > stomach able by them. I do agree, some ports do play games with CFLAGS. That's not the only way to do the game above, you know that. The point is, if you introduce yet another macro to detect, any possible method you use to shove that macro into the make stream would work, I think, perfectly well with the method above, which doesn't introduce another macro. So, for any port you care to mention, if the author doesn't like the CFLAGS method for some reason, you just figure out the method the author _does_ seem to respect, and use that. If you could illustrate some way that adding the __44bsd__ macro could do something that the param method couldn't, well, I'll change my tune quick enough. > > -- David > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD (301) 220-2114 | version 3.0 current -- and great FUN! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.970109102217.7731A-100000>