1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
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 |
*
|
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
32 |
* $Revision: 6.9 $
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
33 |
*
|
34 |
* File Description:
|
|
35 |
* system dependent header
|
|
36 |
* version for Linux
|
|
37 |
*
|
|
38 |
* Modifications:
|
|
39 |
* --------------------------------------------------------------------------
|
|
40 |
* $Log: ncbilcl.lnx,v $
|
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
41 |
* Revision 6.9 2004/01/21 22:31:20 ucko
|
42 |
* Define PROC_X86_64 on x86-64 systems.
|
|
43 |
*
|
|
44 |
* Revision 6.8 2002/11/22 20:05:04 lavr
|
|
45 |
* Configure HAVE_STRDUP and HAVE_STRCASECMP
|
|
46 |
*
|
|
47 |
* Revision 6.7 2002/11/06 21:23:47 ucko
|
|
48 |
* Handle non-i386 platforms.
|
|
49 |
* Enable large file support here, to ensure consistency.
|
|
50 |
*
|
|
51 |
* Revision 6.6 2002/07/11 22:13:06 vakatov
|
|
52 |
* #define MMAP_AVAIL
|
|
53 |
*
|
|
54 |
* Revision 6.5 2002/07/11 19:26:31 ivanov
|
|
55 |
* Added macro HAVE_MADVISE
|
|
56 |
*
|
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
57 |
* Revision 6.4 2000/06/15 16:47:13 beloslyu
|
58 |
* fixes for new RedHat6.2
|
|
59 |
*
|
|
60 |
* Revision 6.3 2000/02/10 16:36:32 vakatov
|
|
61 |
* Added _SVID_SOURCE
|
|
62 |
*
|
|
63 |
* Revision 6.2 1999/07/12 05:50:49 vakatov
|
|
64 |
* Avoid redefinition of #_REENTRANT
|
|
65 |
*
|
|
66 |
* Revision 6.1 1998/12/10 17:04:07 vakatov
|
|
67 |
* Fixed to compile under LINUX(Red Hat 2.XX, gcc, with POSIX threads)
|
|
68 |
*
|
|
69 |
* Revision 6.0 1997/08/25 18:16:01 madden
|
|
70 |
* Revision changed to 6.0
|
|
71 |
*
|
|
72 |
* Revision 5.1 1996/06/10 17:41:33 epstein
|
|
73 |
* added SYSV_IPC_AVAIL per Warren Gish
|
|
74 |
* ==========================================================================
|
|
75 |
*/
|
|
76 |
#ifndef _NCBILCL_
|
|
77 |
#define _NCBILCL_
|
|
78 |
||
79 |
/* PLATFORM DEFINITION FOR Linux */ |
|
80 |
||
81 |
#define COMP_SYSV |
|
82 |
#define OS_UNIX |
|
83 |
#define OS_UNIX_LINUX |
|
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
84 |
#if defined(__alpha__) || #cpu(alpha) || #machine(alpha) |
85 |
#define PROC_ALPHA |
|
86 |
#elif defined(__arm__) || #cpu(arm) || #machine(arm) |
|
87 |
#define PROC_ARM /* ? (only occurrence) */ |
|
88 |
#elif defined(__hppa__) || #cpu(hppa) || #machine(hppa) |
|
89 |
#define PROC_HPPA |
|
90 |
#elif defined(__i386__) || #cpu(i386) || #machine(i386) |
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
91 |
#define PROC_I80X86 |
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
92 |
#elif defined(__ia64__) || #cpu(ia64) || #machine(ia64) |
93 |
#define PROC_IA64 /* ? */ |
|
94 |
#elif defined(m68k) || defined(mc68000) || #cpu(m68k) || #machine(m68k) |
|
95 |
#define PROC_MC680X0 |
|
96 |
#elif defined(__mips__) || defined(_mips) || #cpu(mips) || #machine(mips) |
|
97 |
#define PROC_MIPS |
|
98 |
#elif defined(__powerpc__) || defined(__PPC__) || #cpu(powerpc) || #machine(powerpc) |
|
99 |
#define PROC_PPC |
|
100 |
#elif defined(__s390__) || #cpu(s390) || #machine(s390) |
|
101 |
#define PROC_S390 /* ? */ |
|
102 |
#elif defined(__sh__) || #cpu(sh) || #machine(sh) |
|
103 |
#define PROC_SH /* ? */ |
|
104 |
#elif defined(__sparc__) || #cpu(sparc) || #cpu(sparc64) || #machine(sparc) || #machine(sparc64) |
|
105 |
#define PROC_SPARC |
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
106 |
#elif defined(__x86_64__) || #cpu(x86_64) |
107 |
#define PROC_X86_64 |
|
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
108 |
#else |
109 |
#warning Unknown processor type. Please define something appropriate. |
|
110 |
#endif |
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
111 |
#define WIN_DUMB |
112 |
||
113 |
/*----------------------------------------------------------------------*/ |
|
114 |
/* Desired or available feature list */ |
|
115 |
/*----------------------------------------------------------------------*/ |
|
116 |
#define SYSV_IPC_AVAIL /* System V Interprocess Communication available */ |
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
117 |
#define MMAP_AVAIL |
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
118 |
#undef _POSIX_SOURCE |
119 |
#undef _POSIX_C_SOURCE |
|
120 |
#undef _XOPEN_SOURCE |
|
121 |
#define _POSIX_SOURCE 1 |
|
122 |
#define _POSIX_C_SOURCE 199309L |
|
123 |
#define _XOPEN_SOURCE 500 |
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
124 |
#define HAVE_STRCASECMP 1 |
125 |
#define HAVE_STRDUP 1 |
|
126 |
||
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
127 |
/* Only effective on glibc 2.1 and newer. */ |
128 |
#define _LARGEFILE_SOURCE 1 |
|
129 |
#define _LARGEFILE64_SOURCE 1 |
|
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
130 |
#define _FILE_OFFSET_BITS 64 /* Should be safe, I think... */ |
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
131 |
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
132 |
#ifndef _REENTRANT |
133 |
#define _REENTRANT |
|
134 |
#endif |
|
135 |
||
136 |
/* good for the EGCS C/C++ compiler on Linux(e.g. putenv(), tempnam() proto) */ |
|
137 |
#define _SVID_SOURCE 1 |
|
138 |
||
139 |
/*----------------------------------------------------------------------*/ |
|
140 |
/* #includes */ |
|
141 |
/*----------------------------------------------------------------------*/ |
|
142 |
#include <sys/types.h> |
|
143 |
#include <limits.h> |
|
144 |
#include <sys/stat.h> |
|
145 |
#include <stddef.h> |
|
146 |
#include <stdio.h> |
|
147 |
#include <ctype.h> |
|
148 |
#include <string.h> |
|
149 |
#include <malloc.h> |
|
150 |
#include <memory.h> |
|
151 |
#include <stdlib.h> |
|
152 |
#include <math.h> |
|
153 |
#include <errno.h> |
|
154 |
#include <float.h> |
|
155 |
#include <unistd.h> |
|
156 |
||
157 |
/* Check if there are POSIX threads available */ |
|
158 |
#ifdef _POSIX_THREADS |
|
159 |
#define POSIX_THREADS_AVAIL |
|
160 |
#endif |
|
161 |
||
162 |
||
163 |
/*----------------------------------------------------------------------*/ |
|
164 |
/* Missing ANSI-isms */ |
|
165 |
/*----------------------------------------------------------------------*/ |
|
166 |
#define noalias |
|
167 |
||
168 |
#ifndef SEEK_SET |
|
169 |
#define SEEK_SET 0 /* Set file pointer to offset */ |
|
170 |
#define SEEK_CUR 1 /* Set file pointer to current plus offset */ |
|
171 |
#define SEEK_END 2 /* Set file pointer to EOF plus offset */ |
|
172 |
#endif |
|
173 |
#ifndef FILENAME_MAX |
|
174 |
#define FILENAME_MAX 1024 |
|
175 |
#endif |
|
176 |
||
177 |
/*----------------------------------------------------------------------*/ |
|
178 |
/* Aliased Logicals, Datatypes */ |
|
179 |
/*----------------------------------------------------------------------*/ |
|
180 |
||
181 |
/*----------------------------------------------------------------------*/ |
|
182 |
/* Misc Macros */ |
|
183 |
/*----------------------------------------------------------------------*/ |
|
184 |
#define PROTO(x) x /* Prototypes are acceptable */ |
|
185 |
#define VPROTO(x) x /* Prototype for variable argument list */ |
|
186 |
#define DIRDELIMCHR '/' |
|
187 |
#define DIRDELIMSTR "/" |
|
188 |
#define CWDSTR "." |
|
189 |
||
190 |
#define KBYTE (1024) |
|
191 |
#define MBYTE (1048576) |
|
192 |
||
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
193 |
#include <endian.h> |
194 |
#if __BYTE_ORDER == __LITTLE_ENDIAN |
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
195 |
#define IS_LITTLE_ENDIAN |
2
by Aaron M. Ucko
Whoops, ncbi-data should replace pre-split versions of ncbi-tools6. |
196 |
#else |
197 |
#define IS_BIG_ENDIAN |
|
198 |
#endif |
|
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
199 |
#define TEMPNAM_AVAIL |
1.1.1
by Aaron M. Ucko
Import upstream version 6.1.20040616 |
200 |
#define HAVE_MADVISE |
1
by Aaron M. Ucko
Import upstream version 6.1.20011220a |
201 |
|
202 |
/*----------------------------------------------------------------------*/ |
|
203 |
/* For importing MS_DOS code */ |
|
204 |
/*----------------------------------------------------------------------*/ |
|
205 |
#define near |
|
206 |
#define far |
|
207 |
#define huge |
|
208 |
#define cdecl |
|
209 |
#define pascal |
|
210 |
#define _pascal |
|
211 |
#define _near |
|
212 |
#define _far |
|
213 |
#define _huge |
|
214 |
#define _cdecl |
|
215 |
||
216 |
/*----------------------------------------------------------------------*/ |
|
217 |
/* Macros for Floating Point */ |
|
218 |
/*----------------------------------------------------------------------*/ |
|
219 |
#define EXP2(x) exp((x)*LN2) |
|
220 |
#define LOG2(x) (log(x)*(1./LN2)) |
|
221 |
#define EXP10(x) exp((x)*LN10) |
|
222 |
#define LOG10(x) log10(x) |
|
223 |
||
224 |
/*----------------------------------------------------------------------*/ |
|
225 |
/* Macros Defining Limits */ |
|
226 |
/*----------------------------------------------------------------------*/ |
|
227 |
#define MAXALLOC 0x40000000 /* Largest permissible memory request */ |
|
228 |
||
229 |
#endif |
|
230 |