Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: kusmabite@gmail.com
Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>,
	florian.achleitner.2.6.31@gmail.com,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 1/3] remote-testsvn.c: Avoid the getline() GNU extension function
Date: Sun, 26 Aug 2012 10:31:04 -0700	[thread overview]
Message-ID: <7v3939wofb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CABPQNSZfUO-vjVmBU2+CMbxTXMj_HT=cTFfVbnehUjqOL-vkxw@mail.gmail.com> (Erik Faye-Lund's message of "Sat, 25 Aug 2012 21:20:44 +0200")

Erik Faye-Lund <kusmabite@gmail.com> writes:

> On Sat, Aug 25, 2012 at 7:13 PM, Ramsay Jones
> <ramsay@ramsay1.demon.co.uk> wrote:
>>
>> The getline() function is a GNU extension (you need to define
>> _GNU_SOURCE before including stdio.h) and is, therefore, not
>> portable. In particular, getline() is not available on MinGW.
>
> Actually, getline is a POSIX-2008 feature, so it's not (simply) a GNU extension:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html

True, thanks for pointing it out.  Justify the change with something
like this instead, perhaps?

	The getline() function, even though is in POSIX.1-2008, is
	not available on some platforms.  Use strbuf_getline() for
	portability.

By the way, the remainder of the proposed log message talks about
the difference between getline() that keeps the terminating LF vs
strbuf_getline() that drops it.  Would strbuf_getwholeline() be a
better alternative?

  reply	other threads:[~2012-08-26 17:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25 17:13 [PATCH 1/3] remote-testsvn.c: Avoid the getline() GNU extension function Ramsay Jones
2012-08-25 19:03 ` Joachim Schmitz
2012-08-25 19:20 ` Erik Faye-Lund
2012-08-26 17:31   ` Junio C Hamano [this message]
2012-08-30 17:25     ` Ramsay Jones
2012-08-30 17:19   ` Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v3939wofb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=florian.achleitner.2.6.31@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox