Back to index

glibc  2.9
types.h
Go to the documentation of this file.
00001 /*
00002  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00003  * unrestricted use provided that this legend is included on all tape
00004  * media and as a part of the software program in whole or part.  Users
00005  * may copy or modify Sun RPC without charge, but are not authorized
00006  * to license or distribute it to anyone else except as part of a product or
00007  * program developed by the user.
00008  *
00009  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00010  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00011  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00012  *
00013  * Sun RPC is provided with no support and without any obligation on the
00014  * part of Sun Microsystems, Inc. to assist in its use, correction,
00015  * modification or enhancement.
00016  *
00017  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00018  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00019  * OR ANY PART THEREOF.
00020  *
00021  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00022  * or profits or other special, indirect and consequential damages, even if
00023  * Sun has been advised of the possibility of such damages.
00024  *
00025  * Sun Microsystems, Inc.
00026  * 2550 Garcia Avenue
00027  * Mountain View, California  94043
00028  */
00029 /* fixincludes should not add extern "C" to this file */
00030 /*
00031  * Rpc additions to <sys/types.h>
00032  */
00033 #ifndef _RPC_TYPES_H
00034 #define _RPC_TYPES_H 1
00035 
00036 typedef int bool_t;
00037 typedef int enum_t;
00038 /* This needs to be changed to uint32_t in the future */
00039 typedef unsigned long rpcprog_t;
00040 typedef unsigned long rpcvers_t;
00041 typedef unsigned long rpcproc_t;
00042 typedef unsigned long rpcprot_t;
00043 typedef unsigned long rpcport_t;
00044 
00045 #define        __dontcare__    -1
00046 
00047 #ifndef FALSE
00048 #      define  FALSE   (0)
00049 #endif
00050 
00051 #ifndef TRUE
00052 #      define  TRUE    (1)
00053 #endif
00054 
00055 #ifndef NULL
00056 #      define  NULL 0
00057 #endif
00058 
00059 #include <stdlib.h>         /* For malloc decl.  */
00060 #define mem_alloc(bsize)    malloc(bsize)
00061 /*
00062  * XXX: This must not use the second argument, or code in xdr_array.c needs
00063  * to be modified.
00064  */
00065 #define mem_free(ptr, bsize)       free(ptr)
00066 
00067 #ifndef makedev /* ie, we haven't already included it */
00068 #include <sys/types.h>
00069 #endif
00070 
00071 #ifndef __u_char_defined
00072 typedef __u_char u_char;
00073 typedef __u_short u_short;
00074 typedef __u_int u_int;
00075 typedef __u_long u_long;
00076 typedef __quad_t quad_t;
00077 typedef __u_quad_t u_quad_t;
00078 typedef __fsid_t fsid_t;
00079 # define __u_char_defined
00080 #endif
00081 #ifndef __daddr_t_defined
00082 typedef __daddr_t daddr_t;
00083 typedef __caddr_t caddr_t;
00084 # define __daddr_t_defined
00085 #endif
00086 
00087 #include <sys/time.h>
00088 #include <sys/param.h>
00089 
00090 #include <netinet/in.h>
00091 
00092 #ifndef INADDR_LOOPBACK
00093 #define       INADDR_LOOPBACK         (u_long)0x7F000001
00094 #endif
00095 #ifndef MAXHOSTNAMELEN
00096 #define        MAXHOSTNAMELEN  64
00097 #endif
00098 
00099 #endif /* rpc/types.h */