rtime.c (92990) | rtime.c (143344) |
---|---|
1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 44 unchanged lines hidden (view full) --- 53#include <stdio.h> 54#include <netdb.h> 55#include "un-namespace.h" 56 57#if defined(LIBC_SCCS) && !defined(lint) 58static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 SMI"; 59#endif 60#include <sys/cdefs.h> | 1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 44 unchanged lines hidden (view full) --- 53#include <stdio.h> 54#include <netdb.h> 55#include "un-namespace.h" 56 57#if defined(LIBC_SCCS) && !defined(lint) 58static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 SMI"; 59#endif 60#include <sys/cdefs.h> |
61__FBSDID("$FreeBSD: head/lib/libc/rpc/rtime.c 92990 2002-03-22 23:18:37Z obrien $"); | 61__FBSDID("$FreeBSD: head/lib/libc/rpc/rtime.c 143344 2005-03-10 00:57:01Z stefanf $"); |
62 63extern int _rpc_dtablesize( void ); 64 65#define NYEARS (unsigned long)(1970 - 1900) 66#define TOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4))) 67 68static void do_close( int ); 69 70int 71rtime(addrp, timep, timeout) 72 struct sockaddr_in *addrp; 73 struct timeval *timep; 74 struct timeval *timeout; 75{ 76 int s; 77 fd_set readfds; 78 int res; 79 unsigned long thetime; 80 struct sockaddr_in from; | 62 63extern int _rpc_dtablesize( void ); 64 65#define NYEARS (unsigned long)(1970 - 1900) 66#define TOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4))) 67 68static void do_close( int ); 69 70int 71rtime(addrp, timep, timeout) 72 struct sockaddr_in *addrp; 73 struct timeval *timep; 74 struct timeval *timeout; 75{ 76 int s; 77 fd_set readfds; 78 int res; 79 unsigned long thetime; 80 struct sockaddr_in from; |
81 int fromlen; | 81 socklen_t fromlen; |
82 int type; 83 struct servent *serv; 84 85 if (timeout == NULL) { 86 type = SOCK_STREAM; 87 } else { 88 type = SOCK_DGRAM; 89 } --- 71 unchanged lines hidden --- | 82 int type; 83 struct servent *serv; 84 85 if (timeout == NULL) { 86 type = SOCK_STREAM; 87 } else { 88 type = SOCK_DGRAM; 89 } --- 71 unchanged lines hidden --- |