<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Thu, 2010-09-02 at 13:03 -0700, Alan Coopersmith wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<TT><FONT COLOR="#737373">> Not sure this is progress. Generally people want to move away from</FONT></TT><BR>
<TT><FONT COLOR="#737373">> #ifdef's and move to putting checks in the configure script instead of</FONT></TT><BR>
<TT><FONT COLOR="#737373">> the other way around.</FONT></TT><BR>
</BLOCKQUOTE>
Somehow I got the opposite impression, but I cannot pin point how exactly.<BR>
In this case, the platform check was incomplete/incorrect, so that helps in favor of using<BR>
the compiler which is supposed to know this stuff better than anybody else.<BR>
<BR>
I also considered this platform check "duplicate code". The resource file in config already go<BR>
through the pain of using the preprocessor, so why reinvent the wheel again.<BR>
That's what tipped the balance in favor of ifdef. <BR>
<BR>
A small improvement would be to use CSRG_BASED as it encapsulates the definition<BR>
of BSD-like systems. I did not think it was appropriate to include Xosdefs.h in there.<BR>
There is also another definition of CSRG_BASED in the server.<BR>
<BR>
With either method, if a new distro comes along, an update is required. I also have<BR>
this bug report in mind (<A HREF="https://bugs.freedesktop.org/show_bug.cgi?id=6305)">https://bugs.freedesktop.org/show_bug.cgi?id=6305)</A><BR>
which does not like either method. I try to find a feature check when possible.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<BR>
<TT><FONT COLOR="#1a1a1a">Ideally we'd figure out some way to test for -m support, instead of having</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">to keep track of the set of uname values or preprocessor defines that</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">currently represent OS'es with a BSD-like userland (while new BSD distros</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">don't spring up as often as new Linux distros, it is still a pain every</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">few years to go find all the places to add "|| dragonfly" or whatever the</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">next new one will be, and the hybrids like GNU/kFreeBSD confuse things</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">even more).</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">Unfortunately, I can't think of a good way to test su functionality in</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">a configure script. I wonder if it would be better to replace use of</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">su in the xdm-config with code to setuid before running the *.willing</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">script, to a userid specified in a new option in the xdm-config.</FONT></TT><BR>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>