X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=comstack%2Ftcpip.c;h=a7d33d23de30ffddc955a1e2bc13695db5c498db;hb=fa4bfbc45c934a9431f40588c519085eff9e8ae6;hp=cb24279c37d73684f44b8568cbf0dd6afc5e904c;hpb=de70f47f9680c5fd7b3863f2a647d6dc760c2d98;p=yaz-moved-to-github.git diff --git a/comstack/tcpip.c b/comstack/tcpip.c index cb24279..a7d33d2 100644 --- a/comstack/tcpip.c +++ b/comstack/tcpip.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: tcpip.c,v 1.47 2002-06-12 19:42:38 adam Exp $ + * $Id: tcpip.c,v 1.49 2002-09-20 22:23:13 adam Exp $ */ #include @@ -53,6 +53,10 @@ void *tcpip_straddr(COMSTACK h, const char *str); #define TRC(X) #endif +#ifndef YAZ_SOCKLEN_T +#define YAZ_SOCKLEN_T int +#endif + /* this state is used for both SSL and straight TCP/IP */ typedef struct tcpip_state { @@ -449,11 +453,7 @@ int tcpip_listen(COMSTACK h, char *raddr, int *addrlen, void *cd) { struct sockaddr_in addr; -#ifdef __cplusplus - socklen_t len = sizeof(addr); -#else - int len = sizeof(addr); -#endif + YAZ_SOCKLEN_T len = sizeof(addr); TRC(fprintf(stderr, "tcpip_listen pid=%d\n", getpid())); if (h->state != CS_ST_IDLE) @@ -968,7 +968,7 @@ char *tcpip_addrstr(COMSTACK h) struct sockaddr_in addr; tcpip_state *sp = (struct tcpip_state *)h->cprivate; char *r, *buf = sp->buf; - size_t len; + YAZ_SOCKLEN_T len; struct hostent *host; len = sizeof(addr);