Sourcecode and documentation for libtasn1-2 version 0.2.10-3sarge1
show bar | Show file versions
Search packages:
| Sourcecode archive home

defines.h

00001 /*
00002  *      Copyright (C) 2000,2001,2002 Nikos Mavroyanopoulos
00003  *
00004  * This file is part of LIBASN1.
00005  *
00006  * LIBASN1 is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * LIBASN1 is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
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      /* defines_h */
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 

Generated by  Doxygen 1.5.1