mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] fix sysconf(_SC_LINE_MAX) to return LINE_MAX
Date: Mon, 19 May 2014 18:09:59 -0400	[thread overview]
Message-ID: <20140519220959.GR507@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140507112639.219b38f3@mopad>

On Wed, May 07, 2014 at 11:26:39AM +0200, Christian Wiese wrote:
> Hi,
> 
> attached is a patch for fixing sysconf(_SC_LINE_MAX) to not always
> return -1 but LINE_MAX as defined in limits.h.

I've been looking into this, but -1 seems to be the correct way for
the implementation to report that it does not impose an arbitrary
limit. The specification of limits.h calls for these macros to be
defined with "minimum maximum" values (the lowest limit the
implementation might impose) while sysconf may return a more-relaxed
value. It's not 100% clear whether it's intended that sysconf return
-1 for them, but it seems valid and reasonable. I'd like to hear other
opinions on the matter.

Rich


      reply	other threads:[~2014-05-19 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  9:26 Christian Wiese
2014-05-19 22:09 ` Rich Felker [this message]

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=20140519220959.GR507@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).