Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Need a way to indicate whether 64-bit integers are desired or not #11

Open
cabo opened this issue Apr 2, 2015 · 2 comments
Open

Need a way to indicate whether 64-bit integers are desired or not #11

cabo opened this issue Apr 2, 2015 · 2 comments

Comments

@cabo
Copy link
Owner

cabo commented Apr 2, 2015

Currently, struct cn_cbor keeps uint/sint as "unsigned long".
This is for applications that don't really need 64-bit integers.
However, some do; there should be a configuration option to enable this.

@jimsch
Copy link
Contributor

jimsch commented Jun 8, 2015

The size of unsigned long is compiler based and not fixed. My compiler says that unsigned long is 32 bits so I am currently failing some tests because of this issue. I also have some other casting failures during the build process which may be from similar reasons that I have not gone into yet.

What sizes are needed here? Just 32 and 64? Or do we need to have a 16 as well?

@jimsch
Copy link
Contributor

jimsch commented Jun 8, 2015

Looking at this, I see two ways of dealing with this question.

  1. define a new type cn_cbor_int which is of the correct size (using an ifdef in one place)
  2. push the ifdef in all of the code wherever it needs to be done.

Also we may want to configure if floating point is built in or not. Lots of systems don't need to have floating point code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants