uintptr_t is not defined under MS VC++ 6

Bug #781179 reported by monday2000
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
New
Undecided
Unassigned

Bug Description

The uintptr_t type is not defined under MS VC++ 6.

I suggest a patch.

In cuneiform_src\Kern\h\cctypes.h make a change

#if _MSC_VER <= 1200
typedef unsigned long intptr_t;
typedef unsigned int* uintptr_t; // added by monday2000
#endif

Revision history for this message
Jakub Wilk (jwilk) wrote : Re: [Bug 781179] [NEW] uintptr_t is not defined under MS VC++ 6

>typedef unsigned long intptr_t;
>typedef unsigned int* uintptr_t; // added by monday2000

intptr_t is supposed to be a signed integer type, uintptr_t an unsigned
integer type. So in fact both of these definitions are incorrect.

--
Jakub Wilk

Revision history for this message
monday2000 (monday2000) wrote :

> So in fact both of these definitions are incorrect.

Correct or not - who cares? Without my patch the whole code can NOT be compiled under MS VC++ 6.0. With the patch - everything is compiled OK.

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Who cares whether is compiles with a deprecated, outdated and unsupported compiler, whereas newer and arguably better compilers from Microsoft are available for free and do compile the code correctly?

As for the types, I would define them as

   typedef signed int intptr_t;
   typedef unsigned int uintptr_t;

for a 32-bit platform (the only target that MSVC supports), but probably Jussi could consider using something along the lines of

http://code.google.com/p/msinttypes/

since Microsoft is still unable to get it right. At least, this crap will be localized somewhere and could be potentially less of a PITA to maintain.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.