1/* 2 * Redistribution and use in source and binary forms, with or without 3 * modification, are permitted provided that the following conditions are 4 * met: 5 * 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above 9 * copyright notice, this list of conditions and the following 10 * disclaimer in the documentation and/or other materials 11 * provided with the distribution. 12 * * Neither the name of Sun Microsystems, Inc. nor the names of its 13 * contributors may be used to endorse or promote products derived 14 * from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29/* fixincludes should not add extern "C" to this file */ 30/* 31 * Rpc additions to <sys/types.h> 32 */ 33#ifndef _RPC_TYPES_H 34#define _RPC_TYPES_H 1 35 36typedef int bool_t; 37typedef int enum_t; 38/* This needs to be changed to uint32_t in the future */ 39typedef unsigned long rpcprog_t; 40typedef unsigned long rpcvers_t; 41typedef unsigned long rpcproc_t; 42typedef unsigned long rpcprot_t; 43typedef unsigned long rpcport_t; 44 45#define __dontcare__ -1 46 47#ifndef FALSE 48# define FALSE (0) 49#endif 50 51#ifndef TRUE 52# define TRUE (1) 53#endif 54 55#ifndef NULL 56# define NULL 0 57#endif 58 59#include <stdlib.h> /* For malloc decl. */ 60#define mem_alloc(bsize) malloc(bsize) 61/* 62 * XXX: This must not use the second argument, or code in xdr_array.c needs 63 * to be modified. 64 */ 65#define mem_free(ptr, bsize) free(ptr) 66 67#ifndef makedev /* ie, we haven't already included it */ 68#include <sys/types.h> 69#endif 70 71#ifndef __u_char_defined 72typedef __u_char u_char; 73typedef __u_short u_short; 74typedef __u_int u_int; 75typedef __u_long u_long; 76typedef __quad_t quad_t; 77typedef __u_quad_t u_quad_t; 78typedef __fsid_t fsid_t; 79# define __u_char_defined 80#endif 81#ifndef __daddr_t_defined 82typedef __daddr_t daddr_t; 83typedef __caddr_t caddr_t; 84# define __daddr_t_defined 85#endif 86 87#include <sys/time.h> 88#include <sys/param.h> 89 90#include <netinet/in.h> 91 92#ifndef INADDR_LOOPBACK 93#define INADDR_LOOPBACK (u_long)0x7F000001 94#endif 95#ifndef MAXHOSTNAMELEN 96#define MAXHOSTNAMELEN 64 97#endif 98 99#endif /* rpc/types.h */ 100