2003-02-17 07:39:47 +01:00
|
|
|
#ifndef PLI_TYPES
|
|
|
|
|
#define PLI_TYPES
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2003 Stephen Williams (steve@icarus.com)
|
|
|
|
|
*
|
|
|
|
|
* This source code is free software; you can redistribute it
|
|
|
|
|
* and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
|
*/
|
|
|
|
|
#ifdef HAVE_CVS_IDENT
|
2003-11-08 21:06:21 +01:00
|
|
|
#ident "$Id: _pli_types.h.in,v 1.6 2003/11/08 20:06:21 steve Exp $"
|
2003-09-30 03:33:13 +02:00
|
|
|
#endif
|
|
|
|
|
|
2003-10-02 23:30:06 +02:00
|
|
|
# undef HAVE_INTTYPES_H
|
2003-10-02 21:33:44 +02:00
|
|
|
|
2003-10-02 23:30:06 +02:00
|
|
|
#ifdef HAVE_INTTYPES_H
|
2003-10-02 21:33:44 +02:00
|
|
|
|
|
|
|
|
/*
|
2003-11-08 21:06:21 +01:00
|
|
|
* If the host environment has the stdint.h header file,
|
2003-10-02 21:33:44 +02:00
|
|
|
* then use that to size our PLI types.
|
|
|
|
|
*/
|
2003-10-02 23:30:06 +02:00
|
|
|
#ifndef __STDC_FORMAT_MACROS
|
|
|
|
|
# define __STDC_FORMAT_MACROS
|
|
|
|
|
#endif
|
2003-10-02 21:33:44 +02:00
|
|
|
|
2003-10-02 23:30:06 +02:00
|
|
|
# include <inttypes.h>
|
2003-10-02 21:33:44 +02:00
|
|
|
typedef uint64_t PLI_UINT64;
|
|
|
|
|
typedef int64_t PLI_INT64;
|
|
|
|
|
typedef uint32_t PLI_UINT32;
|
|
|
|
|
typedef int32_t PLI_INT32;
|
|
|
|
|
|
|
|
|
|
typedef signed short PLI_INT16;
|
|
|
|
|
typedef unsigned short PLI_UINT16;
|
|
|
|
|
typedef signed char PLI_BYTE8;
|
|
|
|
|
typedef unsigned char PLI_UBYTE8;
|
|
|
|
|
|
2003-10-29 04:28:27 +01:00
|
|
|
# define PLI_UINT64_FMT PRIu64
|
2003-10-29 04:23:12 +01:00
|
|
|
|
2003-10-02 21:33:44 +02:00
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If we do not have the c99 stdint.h header file, then use
|
2003-11-08 21:06:21 +01:00
|
|
|
* configure detection to guess the pli types ourselves.
|
2003-10-02 21:33:44 +02:00
|
|
|
*/
|
|
|
|
|
|
2003-09-30 03:33:13 +02:00
|
|
|
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
|
|
|
|
# define SIZEOF_UNSIGNED_LONG 8
|
|
|
|
|
# define SIZEOF_UNSIGNED 4
|
|
|
|
|
|
|
|
|
|
#if SIZEOF_UNSIGNED >= 8
|
|
|
|
|
typedef unsigned PLI_UINT64;
|
|
|
|
|
typedef int PLI_INT64;
|
2003-10-29 04:28:27 +01:00
|
|
|
# define PLI_UINT64_FMT "%u"
|
2003-09-30 03:33:13 +02:00
|
|
|
#else
|
|
|
|
|
# if SIZEOF_UNSIGNED_LONG >= 8
|
|
|
|
|
typedef unsigned long PLI_UINT64;
|
|
|
|
|
typedef long PLI_INT64;
|
2003-10-29 04:28:27 +01:00
|
|
|
# define PLI_UINT64_FMT "%lu"
|
2003-09-30 03:33:13 +02:00
|
|
|
# else
|
|
|
|
|
# if SIZEOF_UNSIGNED_LONG_LONG > SIZEOF_UNSIGNED_LONG
|
|
|
|
|
typedef unsigned long long PLI_UINT64;
|
|
|
|
|
typedef long long PLI_INT64;
|
2003-10-29 04:28:27 +01:00
|
|
|
# define PLI_UINT64_FMT "%llu"
|
2003-09-30 03:33:13 +02:00
|
|
|
# else
|
|
|
|
|
typedef unsigned long PLI_UINT64;
|
|
|
|
|
typedef long PLI_INT64;
|
2003-10-29 04:28:27 +01:00
|
|
|
# define PLI_UINT64_FMT "%lu"
|
2003-09-30 03:33:13 +02:00
|
|
|
# endif
|
|
|
|
|
# endif
|
2003-02-17 07:39:47 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
typedef signed int PLI_INT32;
|
|
|
|
|
typedef unsigned int PLI_UINT32;
|
|
|
|
|
typedef signed short PLI_INT16;
|
2003-05-26 06:39:16 +02:00
|
|
|
typedef unsigned short PLI_UINT16;
|
2003-02-17 07:39:47 +01:00
|
|
|
typedef signed char PLI_BYTE8;
|
|
|
|
|
typedef unsigned char PLI_UBYTE8;
|
2003-10-02 21:33:44 +02:00
|
|
|
#endif
|
2003-02-17 07:39:47 +01:00
|
|
|
|
|
|
|
|
/*
|
2003-09-30 03:33:13 +02:00
|
|
|
* $Log: _pli_types.h.in,v $
|
2003-11-08 21:06:21 +01:00
|
|
|
* Revision 1.6 2003/11/08 20:06:21 steve
|
|
|
|
|
* Spelling fixes in comments.
|
|
|
|
|
*
|
2003-10-29 04:28:27 +01:00
|
|
|
* Revision 1.5 2003/10/29 03:28:27 steve
|
|
|
|
|
* Add the PLU_UINT64_FMT string for formatting output.
|
|
|
|
|
*
|
2003-10-29 04:23:12 +01:00
|
|
|
* Revision 1.4 2003/10/29 03:23:12 steve
|
|
|
|
|
* Portably handle time format of VCD prints.
|
|
|
|
|
*
|
2003-10-02 23:30:06 +02:00
|
|
|
* Revision 1.3 2003/10/02 21:30:06 steve
|
|
|
|
|
* Use configured TIME_FMT in vcd dump printf.
|
|
|
|
|
*
|
2003-10-02 21:33:44 +02:00
|
|
|
* Revision 1.2 2003/10/02 19:33:44 steve
|
|
|
|
|
* Put libraries in libdir64.
|
|
|
|
|
*
|
2003-09-30 03:33:13 +02:00
|
|
|
* Revision 1.1 2003/09/30 01:33:13 steve
|
|
|
|
|
* Add PLI_UINT64 to _pli_types.h.
|
|
|
|
|
*
|
2003-05-26 06:39:16 +02:00
|
|
|
* Revision 1.2 2003/05/26 04:39:16 steve
|
|
|
|
|
* Typo type name.
|
|
|
|
|
*
|
2003-02-17 07:39:47 +01:00
|
|
|
* Revision 1.1 2003/02/17 06:39:47 steve
|
|
|
|
|
* Add at least minimal implementations for several
|
|
|
|
|
* acc_ functions. Add support for standard ACC
|
|
|
|
|
* string handling.
|
|
|
|
|
*
|
|
|
|
|
* Add the _pli_types.h header file to carry the
|
|
|
|
|
* IEEE1364-2001 standard PLI type declarations.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
#endif
|