• Main Page
  • Related Pages
  • Data Structures
  • Files
  • File List
  • Globals

lt_inttypes.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of libtrace
00003  *
00004  * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton, 
00005  * New Zealand.
00006  *
00007  * Authors: Daniel Lawson 
00008  *          Perry Lorier
00009  *          Shane Alcock 
00010  *          
00011  * All rights reserved.
00012  *
00013  * This code has been developed by the University of Waikato WAND 
00014  * research group. For further information please see http://www.wand.net.nz/
00015  *
00016  * libtrace is free software; you can redistribute it and/or modify
00017  * it under the terms of the GNU General Public License as published by
00018  * the Free Software Foundation; either version 2 of the License, or
00019  * (at your option) any later version.
00020  *
00021  * libtrace is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024  * GNU General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public License
00027  * along with libtrace; if not, write to the Free Software
00028  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029  *
00030  * $Id: lt_inttypes.h 1559 2010-04-20 02:04:52Z perry $
00031  *
00032  */
00033 
00040 #ifndef LT_INTTYPES_H
00041 #define LT_INTTYPES_H 1 
00043 #ifndef PRIu64
00044 /* We need PRIu64 and others, but inttypes.h either doesn't exist, or it
00045  * doesn't have these identifiers. We define them ourselves...
00046  */
00047 
00048 /* The ISO C99 standard specifies that these macros must only be
00049    defined if explicitly requested.  */
00050 # if !defined __cplusplus || defined __STDC_FORMAT_MACROS
00051 
00052 #  if __WORDSIZE == 64
00053 #   define __PRI64_PREFIX        "l"
00054 #   define __PRIPTR_PREFIX       "l"
00055 #  else
00056 #   define __PRI64_PREFIX        "ll"
00057 #   define __PRIPTR_PREFIX
00058 #  endif
00059 
00060 #  define PRId8                 "d"                     
00061 #  define PRId16                "d"                     
00062 #  define PRId32                "d"                     
00063 #  define PRId64                __PRI64_PREFIX "d"      
00065 #  define PRIi8                 "i"                     
00066 #  define PRIi16                "i"                     
00067 #  define PRIi32                "i"                     
00068 #  define PRIi64                __PRI64_PREFIX "i"      
00070 #  define PRIo8                 "o"                     
00071 #  define PRIo16                "o"                     
00072 #  define PRIo32                "o"                     
00073 #  define PRIo64                __PRI64_PREFIX "o"      
00075 #  define PRIu8                 "u"
00076 #  define PRIu16                "u"
00077 #  define PRIu32                "u"
00078 #  define PRIu64                __PRI64_PREFIX "u"
00079 
00080 #  define PRIx8                 "x"
00081 #  define PRIx16                "x"
00082 #  define PRIx32                "x"
00083 #  define PRIx64                __PRI64_PREFIX "x"
00084 
00085 #  define PRIX8                 "X"
00086 #  define PRIX16                "X"
00087 #  define PRIX32                "X"
00088 #  define PRIX64                __PRI64_PREFIX "X"
00089 
00090 # endif
00091 
00092 # ifndef UINT64_MAX
00093 #  if __WORDSIZE == 64
00094 #   define UINT64_MAX    18446744073709551615UL         
00095 #  else
00096 #   define UINT64_MAX    18446744073709551615ULL        
00097 #  endif
00098 # endif
00099 
00100 #endif
00101 
00102 #endif

Generated on Mon Oct 8 2012 11:29:10 for WAND Trace processing by  doxygen 1.7.1