Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 89 lines (76 sloc) 2.413 kb
d3de1d9 Add at least minimal implementations for several
steve authored
1 #ifndef PLI_TYPES
2 #define PLI_TYPES
3 /*
4 * Copyright (c) 2003 Stephen Williams (steve@icarus.com)
5 *
6 * This source code is free software; you can redistribute it
7 * and/or modify it in source code form under the terms of the GNU
8 * General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
f5aafc3 @arunpersaud updated FSF-address
arunpersaud authored
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
d3de1d9 Add at least minimal implementations for several
steve authored
20 */
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
21
7ef4576 Use configured TIME_FMT in vcd dump printf.
steve authored
22 # undef HAVE_INTTYPES_H
01d22e2 Put libraries in libdir64.
steve authored
23
7ef4576 Use configured TIME_FMT in vcd dump printf.
steve authored
24 #ifdef HAVE_INTTYPES_H
01d22e2 Put libraries in libdir64.
steve authored
25
26 /*
bc0ead2 Spelling fixes in comments.
steve authored
27 * If the host environment has the stdint.h header file,
01d22e2 Put libraries in libdir64.
steve authored
28 * then use that to size our PLI types.
29 */
7ef4576 Use configured TIME_FMT in vcd dump printf.
steve authored
30 #ifndef __STDC_FORMAT_MACROS
31 # define __STDC_FORMAT_MACROS
32 #endif
01d22e2 Put libraries in libdir64.
steve authored
33
7ef4576 Use configured TIME_FMT in vcd dump printf.
steve authored
34 # include <inttypes.h>
01d22e2 Put libraries in libdir64.
steve authored
35 typedef uint64_t PLI_UINT64;
36 typedef int64_t PLI_INT64;
37 typedef uint32_t PLI_UINT32;
38 typedef int32_t PLI_INT32;
39
40 typedef signed short PLI_INT16;
41 typedef unsigned short PLI_UINT16;
1a8ffe2 More standard PLI_BYTE8.
steve authored
42 typedef char PLI_BYTE8;
01d22e2 Put libraries in libdir64.
steve authored
43 typedef unsigned char PLI_UBYTE8;
44
5ff3bcc Add the PLU_UINT64_FMT string for formatting output.
steve authored
45 # define PLI_UINT64_FMT PRIu64
4236b8a Portably handle time format of VCD prints.
steve authored
46
01d22e2 Put libraries in libdir64.
steve authored
47 #else
48
49 /*
50 * If we do not have the c99 stdint.h header file, then use
bc0ead2 Spelling fixes in comments.
steve authored
51 * configure detection to guess the pli types ourselves.
01d22e2 Put libraries in libdir64.
steve authored
52 */
53
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
54 # define SIZEOF_UNSIGNED_LONG_LONG 8
55 # define SIZEOF_UNSIGNED_LONG 8
56 # define SIZEOF_UNSIGNED 4
57
58 #if SIZEOF_UNSIGNED >= 8
59 typedef unsigned PLI_UINT64;
60 typedef int PLI_INT64;
d10da21 Clean up manual definitions of PLI_UINT64_FMT.
steve authored
61 # define PLI_UINT64_FMT "u"
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
62 #else
63 # if SIZEOF_UNSIGNED_LONG >= 8
64 typedef unsigned long PLI_UINT64;
65 typedef long PLI_INT64;
d10da21 Clean up manual definitions of PLI_UINT64_FMT.
steve authored
66 # define PLI_UINT64_FMT "lu"
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
67 # else
68 # if SIZEOF_UNSIGNED_LONG_LONG > SIZEOF_UNSIGNED_LONG
69 typedef unsigned long long PLI_UINT64;
70 typedef long long PLI_INT64;
d10da21 Clean up manual definitions of PLI_UINT64_FMT.
steve authored
71 # define PLI_UINT64_FMT "llu"
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
72 # else
73 typedef unsigned long PLI_UINT64;
74 typedef long PLI_INT64;
d10da21 Clean up manual definitions of PLI_UINT64_FMT.
steve authored
75 # define PLI_UINT64_FMT "lu"
f7b3c72 Add PLI_UINT64 to _pli_types.h.
steve authored
76 # endif
77 # endif
d3de1d9 Add at least minimal implementations for several
steve authored
78 #endif
79
80 typedef signed int PLI_INT32;
81 typedef unsigned int PLI_UINT32;
82 typedef signed short PLI_INT16;
b82a2d4 Typo type name.
steve authored
83 typedef unsigned short PLI_UINT16;
1a8ffe2 More standard PLI_BYTE8.
steve authored
84 typedef char PLI_BYTE8;
d3de1d9 Add at least minimal implementations for several
steve authored
85 typedef unsigned char PLI_UBYTE8;
01d22e2 Put libraries in libdir64.
steve authored
86 #endif
d3de1d9 Add at least minimal implementations for several
steve authored
87
88 #endif
Something went wrong with that request. Please try again.