[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] uint64

From: Stephane Fillod
Subject: Re: [Discuss-gnuradio] uint64
Date: Fri, 17 Feb 2006 11:35:25 +0100
User-agent: Mutt/1.5.11

On Thu, Feb 16, 2006 at 07:17:08PM -0800, Eric Blossom wrote:
> On Wed, Feb 15, 2006 at 04:28:48AM +0100, Martin Dvh wrote:
> > I am creating a block which needs an unsigned 64 bit int  (uint64) in a 
> > struct
> > I want to do this in a cross-platform way but there is no gr_uint64 yet.
> > I can just use unsigned long long int, but I am not sure this is save 
> > (allways 64 bit)
> > I can include stdint.h and use uint64_t, but I don't know if this is 
> > available on every system
> > 
> > The existing gr_types.h file does the following for the current types:
> > typedef short               gr_int16;
> > typedef int                 gr_int32;
> > typedef unsigned short      gr_uint16;
> > typedef unsigned int        gr_uint32;
> > 
> > I am not sure this is save too.
> > 
> > So how to proceed?
> > 
> > Greetings,
> > Martin
> Hi Martin,
> I added gr_int64 and gr_uint64 to gr_types.h.
> I continued the "unsafe practice" pending a proper config fix.

Tedious is the word for the pending fix :-)
Please find a patch attached. It has autoconf detection of stdint.h,
definitions of types accordingly in gr_types.h and a bunch of #include
<config.h> in the C++ sources files since config.h can not easily be 
included from header files (multiple inclusion not handled properly).
This was the opportunity to shoot couple of mistakes in the form
  #ifndef HAVE_CONFIG_H
  #include <config.h>


Attachment: gr_types.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]