Skip to content
This repository
Newer
Older
100644 88 lines (76 sloc) 2.413 kb
d3de1d9c » steve
2003-02-17 Add at least minimal implementations for several
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
f5aafc32 » arunpersaud
2012-08-28 updated FSF-address
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
d3de1d9c » steve
2003-02-17 Add at least minimal implementations for several
20 */
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
21
7ef45769 » steve
2003-10-02 Use configured TIME_FMT in vcd dump printf.
22 # undef HAVE_INTTYPES_H
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
23
7ef45769 » steve
2003-10-02 Use configured TIME_FMT in vcd dump printf.
24 #ifdef HAVE_INTTYPES_H
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
25
26 /*
bc0ead28 » steve
2003-11-08 Spelling fixes in comments.
27 * If the host environment has the stdint.h header file,
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
28 * then use that to size our PLI types.
29 */
7ef45769 » steve
2003-10-02 Use configured TIME_FMT in vcd dump printf.
30 #ifndef __STDC_FORMAT_MACROS
31 # define __STDC_FORMAT_MACROS
32 #endif
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
33
7ef45769 » steve
2003-10-02 Use configured TIME_FMT in vcd dump printf.
34 # include <inttypes.h>
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
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;
1a8ffe2a » steve
2007-06-05 More standard PLI_BYTE8.
42 typedef char PLI_BYTE8;
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
43 typedef unsigned char PLI_UBYTE8;
44
5ff3bcc7 » steve
2003-10-29 Add the PLU_UINT64_FMT string for formatting output.
45 # define PLI_UINT64_FMT PRIu64
4236b8a9 » steve
2003-10-29 Portably handle time format of VCD prints.
46
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
47 #else
48
49 /*
50 * If we do not have the c99 stdint.h header file, then use
bc0ead28 » steve
2003-11-08 Spelling fixes in comments.
51 * configure detection to guess the pli types ourselves.
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
52 */
53
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
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;
d10da212 » steve
2003-11-12 Clean up manual definitions of PLI_UINT64_FMT.
61 # define PLI_UINT64_FMT "u"
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
62 #else
63 # if SIZEOF_UNSIGNED_LONG >= 8
64 typedef unsigned long PLI_UINT64;
65 typedef long PLI_INT64;
d10da212 » steve
2003-11-12 Clean up manual definitions of PLI_UINT64_FMT.
66 # define PLI_UINT64_FMT "lu"
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
67 # else
68 # if SIZEOF_UNSIGNED_LONG_LONG > SIZEOF_UNSIGNED_LONG
69 typedef unsigned long long PLI_UINT64;
70 typedef long long PLI_INT64;
d10da212 » steve
2003-11-12 Clean up manual definitions of PLI_UINT64_FMT.
71 # define PLI_UINT64_FMT "llu"
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
72 # else
73 typedef unsigned long PLI_UINT64;
74 typedef long PLI_INT64;
d10da212 » steve
2003-11-12 Clean up manual definitions of PLI_UINT64_FMT.
75 # define PLI_UINT64_FMT "lu"
f7b3c720 » steve
2003-09-30 Add PLI_UINT64 to _pli_types.h.
76 # endif
77 # endif
d3de1d9c » steve
2003-02-17 Add at least minimal implementations for several
78 #endif
79
80 typedef signed int PLI_INT32;
81 typedef unsigned int PLI_UINT32;
82 typedef signed short PLI_INT16;
b82a2d47 » steve
2003-05-26 Typo type name.
83 typedef unsigned short PLI_UINT16;
1a8ffe2a » steve
2007-06-05 More standard PLI_BYTE8.
84 typedef char PLI_BYTE8;
d3de1d9c » steve
2003-02-17 Add at least minimal implementations for several
85 typedef unsigned char PLI_UBYTE8;
01d22e20 » steve
2003-10-02 Put libraries in libdir64.
86 #endif
d3de1d9c » steve
2003-02-17 Add at least minimal implementations for several
87
88 #endif
Something went wrong with that request. Please try again.