~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to corelib/ncbiopt.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef _NCBIOPT_
2
2
#define _NCBIOPT_
3
3
 
4
 
/*  $Id: ncbiopt.h,v 6.9 2001/08/09 19:21:29 juran Exp $
 
4
/*  $Id: ncbiopt.h,v 6.15 2004/07/15 15:11:45 ucko Exp $
5
5
* ==========================================================================
6
6
*
7
7
*                            PUBLIC DOMAIN NOTICE
34
34
*
35
35
* --------------------------------------------------------------------------
36
36
* $Log: ncbiopt.h,v $
 
37
* Revision 6.15  2004/07/15 15:11:45  ucko
 
38
* Disable workaround for Linux distributions (RH7?) that misdefine LONG_BIT.
 
39
*
 
40
* Revision 6.14  2004/03/25 17:10:57  lebedev
 
41
* Include stdint.h for Darwin, so undef will work for UINT8_MAX
 
42
*
 
43
* Revision 6.13  2004/03/11 18:53:48  rsmith
 
44
* turn on long long support on UNIX_DARWIN (Mac)
 
45
*
 
46
* Revision 6.12  2003/05/05 11:55:22  rsmith
 
47
* Codewarrior compiling for Win32 already has definitions for INT8 min and max.
 
48
*
 
49
* Revision 6.11  2002/12/18 22:11:27  kans
 
50
* a couple more C++ comments slipped by, changed to C style
 
51
*
 
52
* Revision 6.10  2002/12/17 23:00:48  kans
 
53
* support for OS_UNIX_DARWIN for Mach-O executables (RGS)
 
54
*
37
55
* Revision 6.9  2001/08/09 19:21:29  juran
38
56
* Wrap the inclusion of <stdint.h> in #ifdef __MWERKS__.
39
57
*
102
120
 */
103
121
 
104
122
/*
105
 
// Avoid errors when stdint.h tries to 'redefine' standard macros that we've corrupted,
106
 
// by including it first.
 
123
Avoid errors when stdint.h tries to 'redefine' standard macros that we've corrupted,
 
124
by including it first.
107
125
*/
108
 
#ifdef __MWERKS__
 
126
#if defined(__MWERKS__) || defined(OS_UNIX_DARWIN)
109
127
#include <stdint.h>
110
128
#endif
111
129
 
117
135
#  endif
118
136
 
119
137
   /* on 64-bit operating systems, the long data type is already 8 bytes */
120
 
#  if LONG_BIT==64  &&  !defined(OS_UNIX_LINUX)
 
138
#  if LONG_BIT==64 /* &&  !defined(OS_UNIX_LINUX) */
121
139
#    define Int8  long
122
140
#    define Uint8 unsigned long
123
141
 
133
151
 
134
152
#  elif defined(OS_UNIX)
135
153
     /* (signed) */
136
 
#    if defined(OS_UNIX_LINUX) || defined(OS_UNIX_SOL) || defined(OS_UNIX_IRIX) || defined(PROC_HPPA) || defined(OS_UNIX_AIX)
 
154
#    if defined(OS_UNIX_LINUX) || defined(OS_UNIX_SOL) || \
 
155
    defined(OS_UNIX_IRIX) || defined(PROC_HPPA) || defined(OS_UNIX_AIX) || defined(OS_UNIX_DARWIN)
137
156
#      define Int8 long long
138
157
#    elif defined(PROC_ALPHA)
139
158
#      define Int8 long
161
180
 
162
181
 
163
182
 
 
183
/* Have to undefine Int8 limits if already defined, as on some platforms
 
184
 * INT8_MAX, etc. exist but refer to 8-bit(not 8-byte!) integers
 
185
 RGS no need to worry about partially Defined stuff if we do them individually
 
186
*/
 
187
#       if defined(INT8_MIN)
 
188
#               undef INT8_MIN
 
189
#       endif
 
190
#       if defined(INT8_MAX)
 
191
#               undef INT8_MAX
 
192
#       endif
 
193
#       if defined(UINT8_MAX)
 
194
#               undef UINT8_MAX
 
195
#       endif
 
196
 
164
197
#  if  defined(Int8)  ||  defined(Uint8)
165
198
 
166
199
#    if !defined(Int8)  ||  !defined(Uint8)
172
205
     typedef Uint8  Nlm_Uint8;
173
206
     typedef Uint8* Nlm_Uint8Ptr;
174
207
 
175
 
/* Have to undefine Int8 limits if already defined, as on some platforms
176
 
 * INT8_MAX, etc. exist but refer to 8-bit(not 8-byte!) integers
177
 
 */
 
208
 
 
209
/*      RGS 
178
210
#    if defined(INT8_MIN) || defined(INT8_MAX) || defined(UINT8_MAX)
179
211
#      if !defined(INT8_MIN) || !defined(INT8_MAX) || !defined(UINT8_MAX)
180
212
         ;;;!!!PARTIALLY DEFINED 8-BYTE INTEGER LIMITS!!!;;;
183
215
#      undef INT8_MAX
184
216
#      undef UINT8_MAX
185
217
#    endif
 
218
*/
186
219
 
187
220
#    if LONG_BIT==64
188
221
#      define INT8_MIN  LONG_MIN
194
227
#      define INT8_MAX  LONG_LONG_MAX
195
228
#      define UINT8_MAX ULONG_LONG_MAX
196
229
 
197
 
#    elif defined(OS_NT)
198
 
#      define INT8_MIN  _I64_MIN
199
 
#      define INT8_MAX  _I64_MAX
200
 
#      define UINT8_MAX _UI64_MAX
201
 
 
 
230
#    elif defined(OS_NT) && ! defined(COMP_METRO)
 
231
#        define INT8_MIN  _I64_MIN
 
232
#        define INT8_MAX  _I64_MAX
 
233
#        define UINT8_MAX _UI64_MAX
202
234
#    else /* def GNUC, LONG_BIT==64 */
203
235
#      ifdef LLONG_MIN
204
236
#        define INT8_MIN LLONG_MIN