tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

more fun with MySQL cluster (actually C++)



 Thanks to jperkin@ for the hint about using embedded boost.
That worked quite nicely. Now onto the next problem...
 MySQL cluster is building nicely on my -current development
box, but it fails to build on my -9 pbulk box, like so:
-----
/tmp/databases/mysql-cluster/work/mysql-cluster-gpl-8.0.21/mysys/kqueue_timers.cc: In function 'void* timer_notify_thread_func(void*)':
/tmp/databases/mysql-cluster/work/mysql-cluster-gpl-8.0.21/mysys/kqueue_timers.cc:72:50: error: invalid static_cast from type 'intptr_t {aka long int}' to type 'my_timer_t*'
 timer = static_cast<my_timer_t *>(kev.udata);
 ^
In file included from /usr/include/errno.h:42:0,
 from /tmp/databases/mysql-cluster/work/mysql-cluster-gpl-8.0.21/mysys/kqueue_timers.cc:27:
/tmp/databases/mysql-cluster/work/mysql-cluster-gpl-8.0.21/mysys/kqueue_timers.cc: In function 'int my_timer_set(my_timer_t*, long unsigned int)':
/tmp/databases/mysql-cluster/work/mysql-cluster-gpl-8.0.21/mysys/kqueue_timers.cc:184:3: error: invalid static_cast from type 'my_timer_t*' to type 'intptr_t {aka long int}'
 EV_SET(&kev, timer->id, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, time, timer);
 ^
gmake[2]: *** [mysys/CMakeFiles/mysys_objlib.dir/build.make:1291: mysys/CMakeFiles/mysys_objlib.dir/kqueue_timers.cc.o] Error 1
-----
On the -9 box, kev.udata (from <sys/event.h>) is defined as intptr_t,
but on -current, kev.udata is defined as void *. With the EV_SET,
the error has to do with the last argument. On the -9 box, it is
defined as intptr_t, but on -current, it is defined as void *.
 I don't do C++. The code in question looks like:
-----
 if (kev.filter == EVFILT_TIMER) {
 timer = static_cast<my_timer_t *>(kev.udata);
-----
and 
-----
int my_timer_set(my_timer_t *timer, unsigned long time) {
 struct kevent kev;
 EV_SET(&kev, timer->id, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, time, timer);
 return kevent(kq_fd, &kev, 1, NULL, 0, NULL);
}
-----
Any hints on what I can to do make this work on both -9 and -current?


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /