Hi, I'm a maintainer of the MacPorts project and I'm trying to update our fastdb port from version 3.05, which doesn't compile for us anymore, to version 3.64, which doesn't either. 3.64 has the following error when compiling on Snow Leopard, which compiles 64-bit by default:
/usr/bin/g++-4.2 -c -Iinc -Wall -O0 -g -fPIC -pthread src/class.cpp
In file included from inc/sync.h:17,
from inc/class.h:15,
from inc/database.h:14,
from inc/fastdb.h:19,
from src/class.cpp:13:
inc/sync_unix.h: In static member function 'static int dbThread::getCurrentThreadId()':
inc/sync_unix.h:163: error: cast from '_opaque_pthread_t*' to 'int' loses precision
As far as I can tell, the pthread_t type that pthread_self returns is a 64-bit quantity when compiling on 64-bit Mac OS X, which is why your cast to int fails.