ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/PrimerMatch/types.h
Revision: 1.3
Committed: Mon Oct 9 21:42:05 2006 UTC (9 years, 10 months ago) by nje01
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +13 -1 lines
Log Message:
Updates for OSX/Darwin

Line File contents
1 /**************************************************************************
2 * This code is part of the supporting infrastructure for ATA Mapper.
3 * Copyright (C) 2002,2003,2004 Applera Corporation. All rights reserved.
4 * Author: Nathan Edwards
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received (LICENSE.txt) a copy of the GNU General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *************************************************************************/
20
21 #ifndef _IBPEP_TYPES_H_
22 #define _IBPEP_TYPES_H_
23
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <sys/stat.h>
27 #include <unistd.h>
28
29 #if defined(__linux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
30 typedef __off64_t FILE_POSITION_TYPE;
31 typedef __off64_t FILE_SIZE_TYPE;
32 # define FSEEK fseeko
33 # define FTELL ftello
34 # include <sstream>
35 # define istrstream istringstream
36 # define ostrstream ostringstream
37 # include <values.h>
38 typedef long long unsigned int bigword;
39 # define ASCTIME(s,t) char s[1024]; asctime_r(t,s)
40 # define GETPAGESIZE getpagesize()
41 # define DRAND48 drand48()
42 #elif defined(__linux)
43 typedef __off_t FILE_POSITION_TYPE;
44 typedef __off_t FILE_SIZE_TYPE;
45 # define FSEEK fseek
46 # define FTELL ftell
47 # include <sstream>
48 # define istrstream istringstream
49 # define ostrstream ostringstream
50 # include <values.h>
51 typedef long long unsigned int bigword;
52 # define ASCTIME(s,t) char *s; s = asctime(t)
53 # define GETPAGESIZE getpagesize()
54 # define DRAND48 drand48()
55 #elif defined(__alpha)
56 typedef off_t FILE_POSITION_TYPE;
57 typedef off_t FILE_SIZE_TYPE;
58 # define FSEEK fseek
59 # define FTELL ftell
60 # include <iostream>
61 # include <strstream>
62 # include <values.h>
63 typedef long unsigned int bigword;
64 # define ASCTIME(s,t) char s[1024]; s = asctime_r(t,s)
65 # define GETPAGESIZE getpagesize()
66 # define DRAND48 drand48()
67 #elif defined(_AIX)
68 typedef off_t FILE_POSITION_TYPE;
69 typedef off_t FILE_SIZE_TYPE;
70 # define FSEEK fseek
71 # define FTELL ftell
72 # include <strstream>
73 # include <values.h>
74 typedef long unsigned int bigword;
75 # define ASCTIME(s,t) char s[1024]; asctime_r(t,s)
76 # define GETPAGESIZE getpagesize()
77 # define DRAND48 drand48()
78 #elif defined(__CYGWIN__)
79 typedef off_t FILE_POSITION_TYPE;
80 typedef off_t FILE_SIZE_TYPE;
81 # define FSEEK fseek
82 # define FTELL ftell
83 # include <sstream>
84 # define istrstream istringstream
85 # define ostrstream ostringstream
86 # define MAXINT ((int)(~(1U<<31)))
87 typedef long long unsigned int bigword;
88 # define ASCTIME(s,t) char s[1024]; asctime_r(t,s)
89 # define GETPAGESIZE getpagesize()
90 # define DRAND48 drand48()
91 #elif defined(__MINGW32__)
92 typedef off_t FILE_POSITION_TYPE;
93 typedef off_t FILE_SIZE_TYPE;
94 # define FSEEK fseek
95 # define FTELL ftell
96 # include <sstream>
97 # define istrstream istringstream
98 # define ostrstream ostringstream
99 # define MAXINT ((int)(~(1U<<31)))
100 typedef long long unsigned int bigword;
101 # define ASCTIME(s,t) s = asctime(t)
102 # define GETPAGESIZE 8192
103 # define DRAND48 ((double)rand()/RAND_MAX)
104 # define srand48(s) srand(s)
105 #elif defined(__sun)
106 typedef off_t FILE_POSITION_TYPE;
107 typedef off_t FILE_SIZE_TYPE;
108 # define FSEEK fseek
109 # define FTELL ftell
110 # include <iostream>
111 # include <strstream>
112 # include <values.h>
113 typedef long unsigned int bigword;
114 # define ASCTIME(s,t) char *s; s = asctime(t)
115 # define GETPAGESIZE getpagesize()
116 # define DRAND48 drand48()
117 #elif defined(__APPLE_CC__)
118 typedef off_t FILE_POSITION_TYPE;
119 typedef off_t FILE_SIZE_TYPE;
120 # define FSEEK fseeko
121 # define FTELL ftello
122 # include <iostream>
123 # include <strstream>
124 # include <limits.h>
125 # define MAXINT INT_MAX
126 typedef long long unsigned int bigword;
127 # define ASCTIME(s,t) char *s; s = asctime(t)
128 # define GETPAGESIZE getpagesize()
129 # define DRAND48 drand48()
130 #endif
131
132 int compare(FILE_POSITION_TYPE const &, FILE_POSITION_TYPE const &);
133 #endif