|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/corelib/ncbilcl.lnx |
source navigation diff markup identifier search freetext search file search |
1 /* ncbilcl.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * Although all reasonable efforts have been taken to ensure the accuracy 15 * and reliability of the software and data, the NLM and the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * =========================================================================== 25 * 26 * File Name: ncbilcl.h 27 * 28 * Author: Gish, Kans, Ostell, Schuler, Epstein, Vakatov 29 * 30 * Version Creation Date: 8/1/94 31 * 32 * $Revision: 6.10 $ 33 * 34 * File Description: 35 * system dependent header 36 * version for Linux 37 * 38 * Modifications: 39 * -------------------------------------------------------------------------- 40 * $Log: ncbilcl.lnx,v $ 41 * Revision 6.10 2009/07/07 20:21:43 ucko 42 * Don't bother with #cpu() or #machine() checks, which are redundant and 43 * moreover yield noisy deprecation warnings with GCC 4.4. 44 * 45 * Revision 6.9 2004/01/21 22:31:20 ucko 46 * Define PROC_X86_64 on x86-64 systems. 47 * 48 * Revision 6.8 2002/11/22 20:05:04 lavr 49 * Configure HAVE_STRDUP and HAVE_STRCASECMP 50 * 51 * Revision 6.7 2002/11/06 21:23:47 ucko 52 * Handle non-i386 platforms. 53 * Enable large file support here, to ensure consistency. 54 * 55 * Revision 6.6 2002/07/11 22:13:06 vakatov 56 * #define MMAP_AVAIL 57 * 58 * Revision 6.5 2002/07/11 19:26:31 ivanov 59 * Added macro HAVE_MADVISE 60 * 61 * Revision 6.4 2000/06/15 16:47:13 beloslyu 62 * fixes for new RedHat6.2 63 * 64 * Revision 6.3 2000/02/10 16:36:32 vakatov 65 * Added _SVID_SOURCE 66 * 67 * Revision 6.2 1999/07/12 05:50:49 vakatov 68 * Avoid redefinition of #_REENTRANT 69 * 70 * Revision 6.1 1998/12/10 17:04:07 vakatov 71 * Fixed to compile under LINUX(Red Hat 2.XX, gcc, with POSIX threads) 72 * 73 * Revision 6.0 1997/08/25 18:16:01 madden 74 * Revision changed to 6.0 75 * 76 * Revision 5.1 1996/06/10 17:41:33 epstein 77 * added SYSV_IPC_AVAIL per Warren Gish 78 * ========================================================================== 79 */ 80 #ifndef _NCBILCL_ 81 #define _NCBILCL_ 82 83 /* PLATFORM DEFINITION FOR Linux */ 84 85 #define COMP_SYSV 86 #define OS_UNIX 87 #define OS_UNIX_LINUX 88 #if defined(__alpha__) 89 #define PROC_ALPHA 90 #elif defined(__arm__) 91 #define PROC_ARM /* ? (only occurrence) */ 92 #elif defined(__hppa__) 93 #define PROC_HPPA 94 #elif defined(__i386__) 95 #define PROC_I80X86 96 #elif defined(__ia64__) 97 #define PROC_IA64 /* ? */ 98 #elif defined(m68k) || defined(mc68000) 99 #define PROC_MC680X0 100 #elif defined(__mips__) || defined(_mips) 101 #define PROC_MIPS 102 #elif defined(__powerpc__) || defined(__PPC__) 103 #define PROC_PPC 104 #elif defined(__s390__) 105 #define PROC_S390 /* ? */ 106 #elif defined(__sh__) 107 #define PROC_SH /* ? */ 108 #elif defined(__sparc__) 109 #define PROC_SPARC 110 #elif defined(__x86_64__) 111 #define PROC_X86_64 112 #else 113 #warning Unknown processor type. Please define something appropriate. 114 #endif 115 #define WIN_DUMB 116 117 /*----------------------------------------------------------------------*/ 118 /* Desired or available feature list */ 119 /*----------------------------------------------------------------------*/ 120 #define SYSV_IPC_AVAIL /* System V Interprocess Communication available */ 121 #define MMAP_AVAIL 122 #undef _POSIX_SOURCE 123 #undef _POSIX_C_SOURCE 124 #undef _XOPEN_SOURCE 125 #define _POSIX_SOURCE 1 126 #define _POSIX_C_SOURCE 199309L 127 #define _XOPEN_SOURCE 500 128 #define HAVE_STRCASECMP 1 129 #define HAVE_STRDUP 1 130 131 /* Only effective on glibc 2.1 and newer. */ 132 #define _LARGEFILE_SOURCE 1 133 #define _LARGEFILE64_SOURCE 1 134 #define _FILE_OFFSET_BITS 64 /* Should be safe, I think... */ 135 136 #ifndef _REENTRANT 137 #define _REENTRANT 138 #endif 139 140 /* good for the EGCS C/C++ compiler on Linux(e.g. putenv(), tempnam() proto) */ 141 #define _SVID_SOURCE 1 142 143 /*----------------------------------------------------------------------*/ 144 /* #includes */ 145 /*----------------------------------------------------------------------*/ 146 #include <sys/types.h> 147 #include <limits.h> 148 #include <sys/stat.h> 149 #include <stddef.h> 150 #include <stdio.h> 151 #include <ctype.h> 152 #include <string.h> 153 #include <malloc.h> 154 #include <memory.h> 155 #include <stdlib.h> 156 #include <math.h> 157 #include <errno.h> 158 #include <float.h> 159 #include <unistd.h> 160 161 /* Check if there are POSIX threads available */ 162 #ifdef _POSIX_THREADS 163 #define POSIX_THREADS_AVAIL 164 #endif 165 166 167 /*----------------------------------------------------------------------*/ 168 /* Missing ANSI-isms */ 169 /*----------------------------------------------------------------------*/ 170 #define noalias 171 172 #ifndef SEEK_SET 173 #define SEEK_SET 0 /* Set file pointer to offset */ 174 #define SEEK_CUR 1 /* Set file pointer to current plus offset */ 175 #define SEEK_END 2 /* Set file pointer to EOF plus offset */ 176 #endif 177 #ifndef FILENAME_MAX 178 #define FILENAME_MAX 1024 179 #endif 180 181 /*----------------------------------------------------------------------*/ 182 /* Aliased Logicals, Datatypes */ 183 /*----------------------------------------------------------------------*/ 184 185 /*----------------------------------------------------------------------*/ 186 /* Misc Macros */ 187 /*----------------------------------------------------------------------*/ 188 #define PROTO(x) x /* Prototypes are acceptable */ 189 #define VPROTO(x) x /* Prototype for variable argument list */ 190 #define DIRDELIMCHR '/' 191 #define DIRDELIMSTR "/" 192 #define CWDSTR "." 193 194 #define KBYTE (1024) 195 #define MBYTE (1048576) 196 197 #include <endian.h> 198 #if __BYTE_ORDER == __LITTLE_ENDIAN 199 #define IS_LITTLE_ENDIAN 200 #else 201 #define IS_BIG_ENDIAN 202 #endif 203 #define TEMPNAM_AVAIL 204 #define HAVE_MADVISE 205 206 /*----------------------------------------------------------------------*/ 207 /* For importing MS_DOS code */ 208 /*----------------------------------------------------------------------*/ 209 #define near 210 #define far 211 #define huge 212 #define cdecl 213 #define pascal 214 #define _pascal 215 #define _near 216 #define _far 217 #define _huge 218 #define _cdecl 219 220 /*----------------------------------------------------------------------*/ 221 /* Macros for Floating Point */ 222 /*----------------------------------------------------------------------*/ 223 #define EXP2(x) exp((x)*LN2) 224 #define LOG2(x) (log(x)*(1./LN2)) 225 #define EXP10(x) exp((x)*LN10) 226 #define LOG10(x) log10(x) 227 228 /*----------------------------------------------------------------------*/ 229 /* Macros Defining Limits */ 230 /*----------------------------------------------------------------------*/ 231 #define MAXALLOC 0x40000000 /* Largest permissible memory request */ 232 233 #endif 234
|
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |