dods-datatypes-static.h

Go to the documentation of this file.
00001 /* dods-datatypes.h.  Generated from dods-datatypes.h.in by configure.  */
00002 
00003 /*
00004   Determine at compile-time the sizes of various datatypes. This uses symbols
00005   defined by configure (See configure.in).
00006   jhrg 10/24/94
00007 
00008   This header is included by all of the DODS DAP library header files which
00009   make use of the dods_* typedefs. C or C++ files can either include
00010   config_dap.h, use their own configure script which defines SIZEOF_LONG,
00011   _INT, _CHAR and _DOUBLE or set these preprocessor symbols themselves in a
00012   Makefile, etc.
00013 
00014   This used to be part of the config_dap.h header, but including that in the
00015   DAP library headers introduced problems when the DAP was used in conjunction
00016   with other libraries. 8/1/2000 jhrg
00017 */
00018 
00019 #ifndef __DODS_DATATYPES__
00020 #define __DODS_DATATYPES__
00021 
00022 #ifdef WIN32
00023 #include <rpc.h>
00024 #include <winsock2.h>
00025 #include <xdr.h>
00026 #else
00027 #include <rpc/types.h>
00028 #include <netinet/in.h>
00029 #include <rpc/xdr.h>
00030 #endif
00031 
00032 #include <inttypes.h>
00033 
00034 /* The typedefs are done using a preprocessor symbol so that autoconf's
00035    `CONFIG_HEADER' can be used. The configure script will then only modify
00036    the dods-datatypes.h header when its contents change. This saves on
00037    compilation since the header is used by many files in the dap++ library.
00038    The downside is that the typedefs are so ugly... 2/14/2001 jhrg */
00039 
00040 typedef int32_t dods_int32;
00041 
00042 typedef uint32_t dods_uint32;
00043 
00044 #define XDR_INT32 xdr_int32_t
00045 #define XDR_UINT32 xdr_uint32_t
00046 
00047 typedef int16_t dods_int16;
00048 
00049 typedef uint16_t dods_uint16;
00050 
00051 #define XDR_INT16 xdr_int16_t
00052 #define XDR_UINT16 xdr_uint16_t
00053 
00054 typedef uint8_t dods_byte;
00055 
00056 typedef double dods_float64;
00057 
00058 typedef float dods_float32;             
00059 
00060 #define XDR_FLOAT64 xdr_double
00061 #define XDR_FLOAT32 xdr_float
00062 
00063 #endif /* __DODS_DATATYPES__ */

Generated on Wed Jun 27 12:56:39 2007 for libdap++ by  doxygen 1.4.7