Re: Syslogger tries to write to /dev/null on Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Syslogger tries to write to /dev/null on Windows
Date: 2010-04-01 11:19:30
Message-ID: p2m9837222c1004010419sa5a084bei9a79099563c7988c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

2010/4/1 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
> NULL_DEV is defined in c.h as "/dev/null", which doesn't work on
> windows. We have a port-specific #define DEVNULL which does work, we
> should be using that.

Wow. Looking at the code around NULL_DEV, that actually looks like a
merge mistake from the old windows branch or something - it has a
comment stating that it should be different on NT, but it isn't...

> Peter Eisentraut inadvertently fixed this for 8.4:
>
> http://archives.postgresql.org/pgsql-committers/2008-12/msg00095.php
>
> by removing NULL_DEV and using always DEVNULL, but back-branches need
> that too. I'll leave NULL_DEV as it is just in case it's used by 3rd
> party modules, but change the two uses of it to use DEVNULL.

Sounds good to me.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jyothi 2010-04-01 11:32:59 BUG #5401: make: *** [pg_rman] Error 1
Previous Message Heikki Linnakangas 2010-04-01 11:10:00 Syslogger tries to write to /dev/null on Windows