Sorry, i forgot: my INT64 is the same as sqlite_int64

Martin Engelschalk wrote:
> Hi,
>
> This is what i do, works for me. No OSX hovever, sorry.
>
> #ifdef _WIN32
> #define INT64 __int64
> #else
> #define INT64 long long
> #endif
>
> // From INT64 to String
>
> INT64 iOther;
> char mBuffer[64];   
>
> #ifdef _WIN32
>     sprintf(mBuffer, "%I64d", iOther);
> #else
>     sprintf(mBuffer, "%lld", iOther);
> #endif
>
> // From String to INT64
>
> #ifdef _WIN32
>     iOther = _atoi64(mBuffer);
> #elif defined(AIX5)
>     iOther = strtoll(mBuffer, 0, 10);
> #elif defined(HPUX1111)
>     iOther = __strtoll(mBuffer, 0, 10);
> #else
>     iOther = atoll(mBuffer);
> #endif
>
> Martin
>
> Sam Carleton wrote:
>   
>> I am current developing a system only on Windows, but I do plan to port it
>> to OSX someday.  I am passing ID's as strings to keep maximum flexibility
>> between databases and the existing system.  So how do I convert a
>> sqlite3_int64 to a string and a string to a sqlite3_int64 in a cross
>> platform fashion?
>>
>> Sam
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>   
>>     
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to