kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: kgio@librelist.org
Subject: Re: There's no TCP_NOPUSH in Solaris 10
Date: Mon, 19 Mar 2012 09:29:04 +0000	[thread overview]
Message-ID: <20120319092904.GA27553@dcvr.yhbt.net> (raw)
In-Reply-To: CAAtReCnE4cWnAS9SeFp7p=v15MxuAwvV91o7pfpd=wbqD8c2sg@mail.gmail.com

Edho Arief <edho@myconan.net> wrote:
> The definition of kgio_autopush_read and kgio_autopush_write (in
> read_write.c) never happened in Solaris 10: it's not linux and there's
> no TCP_NOPUSH anywhere in its system header. It caused error when
> running unicorn (and of course the test):

I don't care for non-Free platforms, but maybe some of the other BSDs
got broken, too, so I pushed out this fix to "master" on
git://bogomips.org/kgio.git

>From 85ae255f73b9b81ae3d17e6420dbb95a29dbe8b7 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 19 Mar 2012 05:53:03 +0000
Subject: [PATCH] fix for non-Linux, non-TCP_NOPUSH platforms

We don't need to care for TCP_NOPUSH in read_write.c, it's
entirely in autopush.c and no-op on platforms without
TCP_CORK/TCP_NOPUSH.  TCP_CORK/TCP_NOPUSH are non-POSIX, so
it's entirely possible some Free systems will lack them.

Reported-by: Edho Arief <edho@myconan.net>
---
 ext/kgio/read_write.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/ext/kgio/read_write.c b/ext/kgio/read_write.c
index 9c2440e..51d2d16 100644
--- a/ext/kgio/read_write.c
+++ b/ext/kgio/read_write.c
@@ -20,11 +20,8 @@ static inline void kgio_autopush_write(VALUE io) { }
 
 #else
 static const int peek_flags = MSG_PEEK;
-#  include <netinet/tcp.h>
-#  if defined(TCP_NOPUSH)
 static inline void kgio_autopush_read(VALUE io) { kgio_autopush_recv(io); }
 static inline void kgio_autopush_write(VALUE io) { kgio_autopush_send(io); }
-#  endif
 #endif
 
 NORETURN(static void raise_empty_bt(VALUE, const char *));


  reply	other threads:[~2012-03-19  9:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-18 12:45 There's no TCP_NOPUSH in Solaris 10 Edho Arief
2012-03-19  9:29 ` Eric Wong [this message]
2012-03-19  9:31 ` Eric Wong
2012-03-19  9:35   ` Edho Arief
2012-03-19  9:52     ` Eric Wong
2012-03-19 10:10       ` Edho Arief
2012-03-19 20:09         ` Eric Wong
2012-03-20 10:53           ` Edho Arief
2012-03-21 20:15             ` Eric Wong
2012-03-22  1:48               ` Edho Arief
2012-03-22  8:38                 ` Eric Wong
2012-03-22 15:00                   ` Edho Arief
2012-03-23 21:15                     ` Eric Wong

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

  List information: https://yhbt.net/kgio/

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

  git send-email \
    --in-reply-to=20120319092904.GA27553@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=kgio@librelist.org \
    /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://yhbt.net/kgio.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).