Loading innobase/configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ fi case "$target_os" in hp*) CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";; irix*) CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; osf*) Loading innobase/os/os0thread.c +15 −0 Original line number Diff line number Diff line Loading @@ -32,12 +32,27 @@ os_thread_get_curr_id(void) pthr = pthread_self(); #ifdef UNIV_HPUX /* TODO: in the future we have to change os_thread_id to pthread_t; the following cast may work in a wrong way on some systems if pthread_t is a struct; this is just a quick fix for HP-UX to eliminate a compiler warning */ /* The below typecast trick will certainly not work if this assertion fails */ ut_a(sizeof(pthread_t) >= sizeof(os_thread_id_t)); return(*(os_thread_id_t*)((void*) (&pthr))); #else /* TODO: define os_thread_id_t in Unix as the same as pthread_t and compare them with appropriate Posix pthread functions! The following typecast will not work if pthread_t is not an integer or a pointer to a unique object for the thread! */ return((os_thread_id_t)pthr); #endif #endif } Loading Loading
innobase/configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ fi case "$target_os" in hp*) CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";; irix*) CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; osf*) Loading
innobase/os/os0thread.c +15 −0 Original line number Diff line number Diff line Loading @@ -32,12 +32,27 @@ os_thread_get_curr_id(void) pthr = pthread_self(); #ifdef UNIV_HPUX /* TODO: in the future we have to change os_thread_id to pthread_t; the following cast may work in a wrong way on some systems if pthread_t is a struct; this is just a quick fix for HP-UX to eliminate a compiler warning */ /* The below typecast trick will certainly not work if this assertion fails */ ut_a(sizeof(pthread_t) >= sizeof(os_thread_id_t)); return(*(os_thread_id_t*)((void*) (&pthr))); #else /* TODO: define os_thread_id_t in Unix as the same as pthread_t and compare them with appropriate Posix pthread functions! The following typecast will not work if pthread_t is not an integer or a pointer to a unique object for the thread! */ return((os_thread_id_t)pthr); #endif #endif } Loading