We've used __int64 as 64-bit type. But it is MS
expansion to Visual C so it is not portable.
long long is C99 standard's (at least) 64-bit -type.
Logged In: YES
It appears VC6 doesn't recognize long long type.
So maybe we should use our own typedef for 64-bit ints to
keep them compiling with VC6 and also make code more
portable. I'm specifically thinking about backend compare
code we want to use with APR...
Logged In: YES
Here is an example of code I'm using where I'm interfacing
with berkeleydb code (the ifdef is from their header, I
didn't invent it) -- this is from a windows-only subsection
of a header file. The unix version gets these typedefs from
<sys/types.h> I think.
typedef unsigned __int8 u_int8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 u_int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 u_int32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 u_int64_t;
Problem with $product specific typedefs is that every
product uses their different notation. :( There are uint64,
u_int64, _uint64 etc etc. Which gets nasty when you try to
use two such libraries...
Anyway it seems very likely we start building compare code
with APR library so that part of code can easily use APR
That is why there are typedefs in the code I quoted, to
avoid all that ugliness. See, those are typedefs, and only
occur once -- then all other code is built on top of the
typedefs, and doesn't need to know about them.
(I think this is a really common solution to cross-platform
There are a lot of such typedefs, mostly to work around poor
Microsoft support for standards. But what is being
consolidated via those typedefs is not different typedefs in
different libraries, but rather different base types in
different compilers (what I think you call "products").
Practically, in that project, one can simplify greatly and
say that there is gcc, used by a zillion platforms,
including mingw and cygwin, and there is Visual Studio's
Sorry, I didn't really explain my point. What I was saying
is different code usually has different typedefs. And
sometimes getting them work with each other isn't easy. Or
is just ugly.
Well, I think we need to just adobt some typedefs and start
using them. And APR would be a good choice since it is
already cross-platform and used in lots of different
environments so we know it works. :)
[BTW, I yesterday added some more info about PSDKs, VC/VS
versions and setting them for compiling WinMerge into
docs/developers/readme-developers.html. Maybe that helps you
too, as I remember you had problems in compiling. Though you
didn't tell what kind of problems..]
I didn't say why I couldn't compile because it was the same
reason as so many times before and I guessed you would not
want to hear it again; because I don't have the platform sdk
available to me everywhere.
Closing as this cannot be implemented as originally planned.
VC6 does not support long long type and we want to support VC6.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.