zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
Cc: ZSH Workers Mailing List <zsh-workers@sunsite.dk>
Subject: Re: AIX patch
Date: Wed, 20 Jun 2001 17:12:43 +0000	[thread overview]
Message-ID: <1010620171243.ZM8591@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.SV4.4.33.0106192242180.22350-100000@itsrm2.mow.siemens.ru>

On Jun 19, 10:48pm, Andrej Borsenkow wrote:
} Subject: Re: AIX patch
}
} On Tue, 19 Jun 2001, Bart Schaefer wrote:
} 
} > Linux/gcc apparently has an actual `socklen_t' typedef.  Probably should
} > try that first.
} >
} > +    for zsh_type in socklen_t int "unsigned long" size_t ; do
} 
} I had some considerations for testing for int first. If we hit some really
} broken compiler that does not care about protoype mismatch we better have
} the "most common" case first.

That's an excellent reason for trying int *second*.

If the socklen_t typedef exists, it's almost certainly the right thing to
use.  If it doesn't exist, it won't matter whether the compiler cares for
matching prototypes because it'll be a syntax error.

I strongly suspect that the intersection of compilers that botch up the
matching prototypes with headers that typedef socklen_t is the empty set.

} It defaulted to int before - so let's stick to int as much as
} possible. May be, I'm just plain paranoid. And the whole needs check
} for general prototype support of course.

That raises the question of what SOCKLEN_T gets defined to be when NONE
of the types that are attempted work.  (It also raises the question of
whether we should be testing for HAVE_SOCKLEN_T and providing our own
typedef if not, rather than defining a SOCKLEN_T macro.)  I think the
right way to default to `int' is to fall back on it when the test fails
entirely.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-06-20 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-19  6:45 Andrej Borsenkow
2001-06-19 16:11 ` Bart Schaefer
2001-06-19 18:48   ` Andrej Borsenkow
2001-06-20 17:12     ` Bart Schaefer [this message]
2001-06-20 17:56       ` Andrej Borsenkow

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=1010620171243.ZM8591@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.dk \
    /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/zsh/

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).