00001 /* 00002 * 00003 * Copyright (C) 1994-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: ofstd 00015 * 00016 * Author: Andreas Barth 00017 * 00018 * Purpose: common defines for configuration 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:15:50 $ 00022 * CVS/RCS Revision: $Revision: 1.2 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 #ifndef OFDEFINE_H 00030 #define OFDEFINE_H 00031 00032 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00033 #include "dcmtk/ofstd/ofcast.h" 00034 00035 #define INCLUDE_CSTRING 00036 #include "dcmtk/ofstd/ofstdinc.h" 00037 00038 00039 #ifdef HAVE_BZERO 00040 #ifndef HAVE_PROTOTYPE_BZERO 00041 BEGIN_EXTERN_C 00042 extern void bzero(char* s, int len); 00043 END_EXTERN_C 00044 #endif 00045 #endif 00046 00047 00048 /* memzero */ 00049 #ifdef HAVE_MEMSET 00050 # undef memzero 00051 # define memzero(d, n) memset((d), 0, (n)) 00052 # define HAVE_MEMZERO /* This makes using this easier */ 00053 #else 00054 # ifdef HAVE_BZERO 00055 # undef memzero 00056 // some platforms, e.g. OSF1, require the first parameter to be char *. 00057 # define memzero(d, n) bzero(OFstatic_cast(char *, d), (n)) 00058 # define HAVE_MEMZERO /* This makes using this easier */ 00059 # endif 00060 #endif 00061 00062 /* memcpy */ 00063 #ifndef HAVE_MEMCPY 00064 # ifdef HAVE_BCOPY 00065 # undef memcpy 00066 # define memcpy(d, s, n) bcopy((s), (d), (n)) 00067 # define HAVE_MEMCPY /* This makes using this easier */ 00068 # endif 00069 #endif 00070 00071 /* memmove */ 00072 #ifndef HAVE_MEMMOVE 00073 # ifdef HAVE_BCOPY 00074 # undef memmove 00075 # define memmove(d, s, n) bcopy ((s), (d), (n)) 00076 # define HAVE_MEMMOVE /* This makes using this easier */ 00077 # endif 00078 #endif 00079 00080 /* memcmp */ 00081 #ifndef HAVE_MEMCMP 00082 # ifdef HAVE_BCMP 00083 # undef memcmp 00084 # define memcmp(d, s, n) bcmp((s), (d), (n)) 00085 # define HAVE_MEMCMP /* This makes using this easier */ 00086 # endif 00087 #endif 00088 00089 /* strchr, strrchr */ 00090 #ifndef HAVE_STRCHR 00091 # ifdef HAVE_INDEX 00092 # undef strchr 00093 # define strchr index 00094 # undef strrchr 00095 # define strrchr rindex 00096 # define HAVE_STRCHR /* This makes using this easier */ 00097 # define HAVE_STRRCHR /* This makes using this easier */ 00098 # endif 00099 #endif 00100 00101 #endif 00102 00103 /* 00104 * CVS/RCS Log: 00105 * $Log: ofdefine.h,v $ 00106 * Revision 1.2 2010-10-14 13:15:50 joergr 00107 * Updated copyright header. Added reference to COPYRIGHT file. 00108 * 00109 * Revision 1.1 2009-09-28 12:19:02 joergr 00110 * Moved general purpose definition file from module dcmdata to ofstd, and 00111 * added new defines in order to make the usage easier. 00112 * 00113 * Revision 1.8 2005/12/08 16:28:05 meichel 00114 * Changed include path schema for all DCMTK header files 00115 * 00116 * Revision 1.7 2002/11/27 12:07:21 meichel 00117 * Adapted module dcmdata to use of new header file ofstdinc.h 00118 * 00119 * Revision 1.6 2001/06/01 15:48:35 meichel 00120 * Updated copyright header 00121 * 00122 * Revision 1.5 2000/03/08 16:26:12 meichel 00123 * Updated copyright header. 00124 * 00125 * Revision 1.4 1999/03/31 09:24:33 meichel 00126 * Updated copyright header in module dcmdata 00127 * 00128 * 00129 */