X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4D46B8E7.50507@gmail.com>
Date: Mon, 31 Jan 2011 13:28:07 +0000
From: Dave Korn <dave.korn.cygwin@gmail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: On "write" command
References: <4D441414.1010407@alice.it> <4D4615E0.9040903@cygwin.com> <4D46A30D.2010706@gmail.com> <20110131114919.GJ1057@calimero.vinschen.de>
In-Reply-To: <20110131114919.GJ1057@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 31/01/2011 11:49, Corinna Vinschen wrote:
> The utmp file is in the old utmp format for backward compatibility.  The
> utx functions are available and return a ut_tv field, but it's just
> extracted from the utmp ut_time field at function call time.  The right
> thing to do for write is to have a autoconf test for the ut_tv field
> and not using it, if it's not available.

  Nah, I was mistaken.  It actually works fine as-is.  I was fooled by the way
old utmp entries get the first char of the username NULled out into thinking
it was getting bad data, but a quick login convinced me that write actually
works just fine and all the util-linux maintainer needs do is add the
configure option to enable building it.

  I still think that utmp_data macro is going to return
&utmp_data_buf[nutdbuf] at some point, though.  Shouldn't it be "if (utix >=
nutdbuf)"?

    cheers,
      DaveK



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

