Skip site navigation (1) Skip section navigation (2)

Re: installdir patch for win32

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "''pgsql-patches(at)postgresql(dot)org' '" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: installdir patch for win32
Date: 2004-03-26 00:57:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> Tom Lane wrote:
>> Every "#ifdef WIN32" I see reduces my opinion of the quality of work
>> being done for this port.

> At risk of getting (further? :-) on your bad side, IMHO that is a specious
> metric.

Well, it's surely not the only interesting metric, but I don't think
it's specious.  Every #ifdef poses a continuing load on future
maintainers, who have to look at that code and think whether they need
to worry about adjusting it when making nearby changes.  To the extent
that you can avoid ifdefs in favor of cleaner solutions (such as
refactoring code, or solving a general problem instead of making a
platform-specific change in behavior), you'll have more readable and
more maintainable code.

I'm not expecting to see zero ifdefs --- certainly not in the port
modules ;-).  But Bruce's search, further up in the thread, showed that
#ifdef WIN32's are sneaking into a lot of modules that probably
shouldn't have any platform dependencies.  I don't think that's a good
sign.  We should be working to keep those dependencies localized.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2004-03-26 01:07:42
Subject: Re: APC/socket fix (final?)
Previous:From: Claudio NatoliDate: 2004-03-26 00:51:17
Subject: Re: APC/socket fix (final?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group