NCBI C Toolkit Cross Reference

C/corelib/ncbilcl.dwn


  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
 29 *
 30 * Version Creation Date:   8/1/94
 31 *
 32 * $Revision: 6.9 $
 33 *
 34 * File Description:
 35 *               system dependent header
 36 *       version for Darwin 1.2.*
 37 *
 38 * Modifications:
 39 * --------------------------------------------------------------------------
 40 * Date     Name          Description of modification
 41 * -------  ----------    ---------------------------------------------------
 42 *
 43 * $Log: ncbilcl.dwn,v $
 44 * Revision 6.9  2007/04/06 21:10:32  kans
 45 * also check for 64-bit processor conditional symbols
 46 *
 47 * Revision 6.8  2007/04/02 16:06:12  kans
 48 * use __ppc__ and __i386__ to set proper PROC_ platform flags
 49 *
 50 * Revision 6.7  2005/11/16 16:22:32  kans
 51 * support for PowerPC and Intel chips in PROC_ and _ENDIAN flags
 52 *
 53 * Revision 6.6  2003/09/05 21:22:58  beloslyu
 54 * add DARWIN def
 55 *
 56 * Revision 6.5  2003/02/28 14:59:40  kans
 57 * changed PROC_POWERPC to correct PROC_PPC platform symbol
 58 *
 59 * Revision 6.4  2002/11/22 20:05:04  lavr
 60 * Configure HAVE_STRDUP and HAVE_STRCASECMP
 61 *
 62 * Revision 6.3  2002/01/22 16:34:54  kans
 63 * contributor contact information copied from obsolete readme.macosx file
 64 *
 65 * Revision 6.2  2001/04/03 21:01:54  beloslyu
 66 * changed to big endian (according to Nathan Willard <willard@turbogenomics.com>)
 67 *
 68 * Revision 6.1  2001/01/19 20:28:42  kans
 69 * initial checkin - contributed by William Van Etten <vanetten@computefarm.com>
 70 *
 71 *   William Van Etten, PhD
 72 *   Blackstone Technology Group
 73 *   80 Summer Street
 74 *   Boston, MA 02110
 75 *   617-542-4770 x4003
 76 *   vanetten@computefarm.com
 77 *
 78 * Revision 1.1  2001/01/13 15:42:41  vanetten
 79 * port to Darwin 1.2
 80 *
 81 *
 82 *
 83 * ==========================================================================
 84 */
 85 #ifndef _NCBILCL_
 86 #define _NCBILCL_
 87 
 88 /* PLATFORM DEFINITION FOR Darwin 1.2.* */
 89 
 90 #define COMP_BSD
 91 #define OS_UNIX
 92 #define DARWIN
 93 #define OS_UNIX_DARWIN
 94 
 95 /* Mac may be PowerPC or Intel chip */
 96 #if defined(__ppc__) || defined(__ppc64__)
 97 #define PROC_PPC
 98 #endif
 99 #if defined(__i386__) || defined(__x86_64__)
100 #define PROC_I80X86
101 #define PROC_I80_386
102 #endif
103 
104 /* for backward compatibility */
105 #ifndef PROC_I80X86 
106 #ifndef PROC_PPC 
107 #define PROC_PPC 
108 #endif 
109 #endif 
110 
111 #define WIN_DUMB
112 
113 /*----------------------------------------------------------------------*/
114 /*      Desired or available feature list                               */
115 /*----------------------------------------------------------------------*/
116 
117 /*----------------------------------------------------------------------*/
118 /*      #includes                                                       */
119 /*----------------------------------------------------------------------*/
120 #include <sys/types.h>
121 #include <limits.h>
122 #include <sys/stat.h>
123 #include <sys/param.h>
124 #include <stddef.h>
125 #include <stdio.h>
126 #include <ctype.h>
127 #include <string.h>
128 #include <memory.h>
129 #include <stdlib.h>
130 #include <math.h>
131 #include <errno.h>
132 #include <float.h>
133 #include <unistd.h>
134 
135 /* Check if there are POSIX threads available */
136 #ifdef _POSIX_THREADS
137 #define POSIX_THREADS_AVAIL
138 #endif
139 #define HAVE_STRCASECMP 1
140 #define HAVE_STRDUP 1
141 
142 /*----------------------------------------------------------------------*/
143 /*      Missing ANSI-isms                                               */
144 /*----------------------------------------------------------------------*/
145 #ifndef SEEK_SET
146 #define SEEK_SET        0       /* Set file pointer to offset */
147 #define SEEK_CUR        1       /* Set file pointer to current plus offset */
148 #define SEEK_END        2       /* Set file pointer to EOF plus offset */
149 #endif
150 #ifndef FILENAME_MAX
151 #define FILENAME_MAX 1024
152 #endif
153 #ifndef LOGNAME_MAX
154 #define LOGNAME_MAX     MAXLOGNAME
155 #endif
156 #ifdef ALIGN
157 #undef ALIGN
158 #endif
159 
160 /*----------------------------------------------------------------------*/
161 /*      Aliased Logicals, Datatypes                                     */
162 /*----------------------------------------------------------------------*/
163 #ifndef sigset
164 #define sigset signal
165 #endif
166 /*----------------------------------------------------------------------*/
167 /*      Misc Macros                                                     */
168 /*----------------------------------------------------------------------*/
169 #define PROTO(x) x      /* Prototypes are acceptable */
170 #define VPROTO(x) x   /* Prototype for variable argument list */
171 #define DIRDELIMCHR     '/'
172 #define DIRDELIMSTR     "/"
173 #define CWDSTR          "."
174 
175 #define KBYTE           (1024)
176 #define MBYTE           (1048576)
177 
178 /* Mac may be PowerPC or Intel chip */
179 #ifdef __BIG_ENDIAN__ 
180 #define IS_BIG_ENDIAN 
181 #endif 
182 #ifdef __LITTLE_ENDIAN__ 
183 #define IS_LITTLE_ENDIAN 
184 #endif 
185 
186 /* for backward compatibility */
187 #ifndef IS_LITTLE_ENDIAN 
188 #ifndef IS_BIG_ENDIAN 
189 #define IS_BIG_ENDIAN 
190 #endif 
191 #endif 
192 
193 #define TEMPNAM_AVAIL
194 
195 /*----------------------------------------------------------------------*/
196 /*      For importing MS_DOS code                                       */
197 /*----------------------------------------------------------------------*/
198 #define near
199 #define far
200 #define huge
201 #define cdecl
202 #define pascal
203 #define _pascal
204 #define _near
205 #define _far
206 #define _huge
207 #define _cdecl
208 
209 /*----------------------------------------------------------------------*/
210 /*      Macros for Floating Point                                       */
211 /*----------------------------------------------------------------------*/
212 #define EXP2(x) exp((x)*LN2)
213 #define LOG2(x) (log(x)*(1./LN2))
214 #define EXP10(x) exp((x)*LN10)
215 #define LOG10(x) log10(x)
216 
217 /*----------------------------------------------------------------------*/
218 /*      Macros Defining Limits                                          */
219 /*----------------------------------------------------------------------*/
220 #define MAXALLOC        0x40000000 /* Largest permissible memory request */
221 
222 #endif
223 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.