Qmail
[Top] [All Lists]

Re: Let's start working! (Re: qmail Patch Repository)

To: Qmail mailing list <qmail@list.cr.yp.to>
Subject: Re: Let's start working! (Re: qmail Patch Repository)
From: Fabio Busatto <fabio.busatto@sikurezza.org>
Date: Thu, 8 Mar 2007 15:11:28 +0100
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <20070308135119.GA2090@discworld.dyndns.org>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <45E59056.50008@cmcflex.com> <20070228151607.GB24361@nachos.phaseit.com> <20070228155340.GA10453@discworld.dyndns.org> <20070228161610.GC16799@c-76-18-79-168.hsd1.nm.comcast.net> <20070228181409.GE24498@nachos.phaseit.com> <17903.12345.67317.524508@desk.crynwr.com> <20070308093225.GA26671@nachos.phaseit.com> <20070308135119.GA2090@discworld.dyndns.org>
Reply-to: Qmail mailing list <qmail@list.cr.yp.to>
User-agent: Mutt/1.4.2i
On Thu, Mar 08, 2007 at 07:51:19AM -0600, Charles Cazabon wrote:
> Because the original form of the source code is not important for the
> compiler; it is only important for the programmer.  Anything that makes the
> source code harder to understand (and littering it with code that is
> conditionally included/excluded does that) makes it less useful.

This is why I asserted that it must be used in a wise way.
Do you think that even expert programmers cannot create readable code using
preprocessor conditionals? I'm sure you don't think this..

> Look at the way djb packages the original, unmodified qmail-1.03.  *That* is
> the right approach to the problem.

It uses preoprocessor conditionals too. In a wise way.
But the real problem is that qmail-1.03 is qmail-1.03, it doesn't need to make
some portions of its code available or not based on user choices, while we need
exactly that.

We need to create a source file that can be (through user choices) the same as
the original qmail-1.03, or something else (more or less modified).

<original qmail-1.03 code..>

#ifdef SOME_NEW_FATURE
  <new function call>
#endif

<original qmail-1.03 code..>

#ifdef SOME_NEW_FATURE
<new function definition..>
#endif


If you compile without SOME_NEW_FATURE defined, you've the original qmail code,
otherwise you've the modified version you want. Using this approach is relative 
easy
to merge different patches (all new code is isolated in new function 
definitions),
and the modified code doesn't overlap (or it overlaps just in a few lines of 
code).

Otherwise, how do you suggest to make various new features available on-demand 
at
compile time?
I'm really interested in you opinion, because I cannot see what's wrong with 
that,
and expecially how can the problem solved in other ways.

Bye :)
Fabio

<Prev in Thread] Current Thread [Next in Thread>