I got these two warnings:

/bin/sh /Users/peter/tools/local//build-1/libtool --silent -- mode=compile gcc -g -O2 -DHAVE_CONFIG_H -DDARWIN - DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - DHAVE_OPENSSL -I/Users/peter/tomcat/develop/tomcat55/connectors/jni/ native/include -I/System/Library/Frameworks/JavaVM.framework/Versions/ 1.5/Home/include -I/System/Library/Frameworks/JavaVM.framework/ Versions/1.5/Home/include/ -I/Users/peter/tools/local/include -I/ Users/peter/tools/local//include/apr-1 -o src/os.lo -c src/os.c && touch src/os.lo
src/os.c: In function 'Java_org_apache_tomcat_jni_OS_threadCurrent':
src/os.c:49: warning: cast from pointer to integer of different size

/bin/sh /Users/peter/tools/local//build-1/libtool --silent -- mode=compile gcc -g -O2 -DHAVE_CONFIG_H -DDARWIN - DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - DHAVE_OPENSSL -I/Users/peter/tomcat/develop/tomcat55/connectors/jni/ native/include -I/System/Library/Frameworks/JavaVM.framework/Versions/ 1.5/Home/include -I/System/Library/Frameworks/JavaVM.framework/ Versions/1.5/Home/include/ -I/Users/peter/tools/local/include -I/ Users/peter/tools/local//include/apr-1 -o src/ssl.lo -c src/ssl.c && touch src/ssl.lo
src/ssl.c: In function 'ssl_thread_id':
src/ssl.c:203: warning: cast from pointer to integer of different size


Source code
os.c
TCN_IMPLEMENT_CALL(jlong, OS, threadCurrent)(TCN_STDARGS)
{
    UNREFERENCED_STDARGS;
    return (jlong)apr_os_thread_current();
}


ssl.c
static unsigned long ssl_thread_id(void)
...
    return (unsigned long)((jlong)apr_os_thread_current());
...

Found at after a long typedef search  /usr/include/sys/_types.h

struct _opaque_pthread_attr_t { long __sig; char __opaque [__PTHREAD_ATTR_SIZE__]; };

But I not clear what is the right cast or we need a spezial darwin handling?

Regards
Peter



Reply via email to