jansson icon indicating copy to clipboard operation
jansson copied to clipboard

Support building in Microsoft Embedded Visual C++ 3.0

Open EBNull opened this issue 12 years ago • 8 comments

I'll bet this is a somewhat esoteric feature, but I needed a JSON library for working on a PocketPC 2002 device. That device runs Windows CE 3.0, which can only be targeted with evc 3.0.

Porting Jansson to work was surprisingly simple, and here's the code to do that.

I don't expect you to merge this into master, or even update it, but it would be nice if you kept the branch in your repository.

Thanks!

EBNull avatar Sep 10 '12 21:09 EBNull

Nice. Seems that porting was very easy.

The support for systems that don't have errno could actually be useful for other users, too. I bet there are platforms out there that don't support errno correctly.

akheron avatar Sep 13 '12 06:09 akheron

If you do accept the patch, note that JSON_HAVE_ERRNO isn't defined anywhere in the configure files, as evc needs it not defined. To maintain original behavior, you'll need to add it to the configure script.

EBNull avatar Sep 13 '12 20:09 EBNull

Yeah. I doubt it can be tested using the configure script, because systems without errno are most probably unable to run the configure script either. The best would be to just add /* #define JSON_HAVE_ERRNO 1 */ in jansson_config.h.in and to document it appropriately.

akheron avatar Sep 14 '12 05:09 akheron

Hi, I'm trying to compile the solution through EVC 3.0 and I have many compilation errors, as can't find assert.h which doesn't exist in EVC 3.0 libraries,, offsetoff undefined, and others... Do I have to do something else at the solution ? Thanks in advance...

marcosm avatar Oct 01 '12 08:10 marcosm

Hi, I'm trying to compile the solution through EVC 3.0 and I have many compilation errors, as can't find assert.h which doesn't exist in EVC 3.0 libraries,, offsetoff undefined, and others... Do I have to do something else at the solution ? Thanks in advance...

marcosm avatar Oct 01 '12 08:10 marcosm

Hi, I'm trying to compile the solution through EVC 3.0 and I have many compilation errors, as can't find assert.h which doesn't exist in EVC 3.0 libraries,, offsetoff undefined, and others... Do I have to do something else at the solution ? Thanks in advance...

marcosm avatar Oct 01 '12 08:10 marcosm

Hi, I'm trying to compile the solution through EVC 3.0 and I have many compilation errors, as can't find assert.h which doesn't exist in EVC 3.0 libraries,, offsetoff undefined, and others... Do I have to do something else at the solution ? Thanks in advance...

marcosm avatar Oct 01 '12 09:10 marcosm

After thinking about if for a bit, I realized I has one nonstandard setup in my environment - I replaced evc's stdlib with STLPort. I assume that gave me assert.h and perhaps some other things.

STLPort officially supports evc 3.0, and using it is somewhat straightforward. I guess the patch I provided has it as a prerequisite.

EBNull avatar Oct 01 '12 14:10 EBNull