Stephane Bortzmeyer <[EMAIL PROTECTED]> writes:
> On Thursday 6 July 2000, at 6 h 25, the keyboard of Alexandre Oliva
> <[EMAIL PROTECTED]> wrote:
>
> > Nope, you'd be performing this test at run time, not at configure time.
>
> OK, I get it, I didn't thought of that. It's a bit painful to have to use such
>tricks for something which should be standard :-(
I agree with Alexandre here, I actually have a function for this,
appended below.
/assar
int
k_getportbyname (const char *service, const char *proto, int default_port)
{
#ifdef HAVE_GETSERVBYNAME
struct servent *sp;
sp = getservbyname(service, proto);
if(sp != NULL)
return sp->s_port;
krb_warning ("%s/%s unknown service, using default port %d\n",
service, proto ? proto : "*", ntohs(default_port));
#endif
return default_port;
}