defines.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DEFINES_H
00022 # define DEFINES_H
00023
00024 #include <config.h>
00025
00026 #ifdef STDC_HEADERS
00027 # include <string.h>
00028 # include <stdlib.h>
00029 # include <stdio.h>
00030 # include <ctype.h>
00031 #endif
00032
00033 #ifdef HAVE_STRINGS_H
00034 # include <strings.h>
00035 #endif
00036
00037 #ifdef HAVE_SYS_TYPES_H
00038 # include <sys/types.h>
00039 #endif
00040
00041
00042 #if HAVE_INTTYPES_H
00043 # include <inttypes.h>
00044 #else
00045 # if HAVE_STDINT_H
00046 # include <stdint.h>
00047 # else
00048 #if SIZEOF_UNSIGNED_LONG_INT == 4
00049 typedef unsigned long int uint32;
00050 typedef signed long int sint32;
00051 #elif SIZEOF_UNSIGNED_INT == 4
00052 typedef unsigned int uint32;
00053 typedef signed int sint32;
00054 #else
00055 # error "Cannot find a 32 bit integer in your system, sorry."
00056 #endif
00057
00058 #if SIZEOF_UNSIGNED_INT == 2
00059 typedef unsigned int uint16;
00060 typedef signed int sint16;
00061 #elif SIZEOF_UNSIGNED_SHORT_INT == 2
00062 typedef unsigned short int uint16;
00063 typedef signed short int sint16;
00064 #else
00065 # error "Cannot find a 16 bit integer in your system, sorry."
00066 #endif
00067
00068 #if SIZEOF_UNSIGNED_CHAR == 1
00069 typedef unsigned char uint8;
00070 typedef signed char int8;
00071 #else
00072 # error "Cannot find an 8 bit char in your system, sorry."
00073 #endif
00074
00075 #ifndef HAVE_MEMMOVE
00076 # ifdef HAVE_BCOPY
00077 # define memmove(d, s, n) bcopy ((s), (d), (n))
00078 # else
00079 # error "Neither memmove nor bcopy exists on your system."
00080 # endif
00081 #endif
00082 # endif
00083 #endif
00084
00085 #endif
00086
00087
00088
00089
00090
00091
00092
00093