Thanks for your information, Roger, it helps a lot. -----邮件原件----- 发件人: [email protected] [mailto:sqlite-users-bounces@sqlite. org] 代表 Roger Binns 发送时间: 2011年9月26日 4:26 收件人: [email protected] 主题: Re: [sqlite] 答复: Is SQLite supporting x64?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/25/2011 02:09 AM, mmxida wrote: > Have the SQLite develop team already concern the 64-bit issue when > they begin the project? Yes. The Unix world had 64 bit platforms way back in the mid-90s (eg DEC Alpha). Not to mention different endianess on different CPUs. > Is all the C code is independent of the platform-specific API? In terms of APIs there is a layer called VFS that adapts to each platform since each platform has different calls for things like opening files or doing locking. SQLite comes with VFS for Unix (POSIX) and Windows (which at one point supported Windows 9x, Windows NT/2000/XP/7 and Windows CE). If you had a custom operating system you can make your own VFS. http://www.sqlite.org/c3ref/vfs.html > As I know, a pointer is 64-bit long on 64-bit Windows as well as a int. Actually Windows uses the model known as LLP64 - only pointers are 64 bit with int and long being 32 bit. The 'long long' type is 64 bit. Other 64 bit platforms are LP64 where in addition to pointers being 64 bit the long type is as well. http://en.wikipedia.org/wiki/64-bit#64-bit_data_models If you look at the start of the SQLite source you can see that it defines an internal sqlite_int64 type for the cases where it needs a 64 bit type with the declaration working no matter what the underlying data model is. > How do they avoid the difference between the win32 and x64 in a > implementation level? The types as used by the API are used. For example the Windows API says to use HANDLE and DWORD for various types (eg open files) so that is exactly what the SQLite code does. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk5/jmgACgkQmOOfHg372QTSoACfTOHp+AXIOY70+vFcUqYR7AEF QTcAnR9zztjixRR5oNCO8Usvi3guCXaT =hemn -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

