On Mon, Jun 06, 2005 at 04:19:16PM -0500, Dan Nelson wrote:
> In the last episode (Jun 06), Albert Chin said:
> > I'm trying to build mysql-4.1.12 on HP-UX 10.20 with gcc-3.4.3. HP-UX
> > 10.20 has CMA threads.
> > 
> > I have the following build failure:
> >   gmake[4]: Entering directory `/opt/build/mysql-4.1.12/innobase/srv'
> >   gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I./../../include
> [...]
> >   -DUNIV_HPUX -DUNIV_HPUX10 -c srv0srv.c
> >   srv0srv.c: In function `srv_suspend_thread':
> >   srv0srv.c:675: error: aggregate value used where an integer was expected
> >   srv0srv.c: In function `srv_release_threads':
> >   srv0srv.c:739: error: aggregate value used where an integer was expected
> >   gmake[4]: *** [srv0srv.o] Error 1
> >   gmake[4]: Leaving directory `/opt/build/mysql-4.1.12/innobase/srv'
> > 
> > The errant code:
> >         if (srv_print_thread_releases) {
> >                 fprintf(stderr,
> >                         "Suspending thread %lu to slot %lu meter %lu\n",
> >                         (ulong) os_thread_get_curr_id(), (ulong) slot_no,
> >                         (ulong) srv_meter[SRV_RECOVERY]);
> >         }
> 
> Shouldn't "os_thread_get_curr_id()" be
> "os_thread_pf(os_thread_get_curr_id())" ?  Try that, or just remove the
> fprintfs; they are debugging code that assumes that a pthread_t is a
> printable type (there is no such guarantee).

Thanks. Patch below.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- innobase/srv/srv0srv.c.orig Mon Jun  6 17:07:35 2005
+++ innobase/srv/srv0srv.c      Mon Jun  6 17:09:10 2005
@@ -672,8 +672,8 @@
        if (srv_print_thread_releases) {
                fprintf(stderr,
                        "Suspending thread %lu to slot %lu meter %lu\n",
-                       (ulong) os_thread_get_curr_id(), (ulong) slot_no,
-                       (ulong) srv_meter[SRV_RECOVERY]);
+                       (ulong) os_thread_pf(os_thread_get_curr_id()),
+                       (ulong) slot_no, (ulong) srv_meter[SRV_RECOVERY]);
        }
 
        slot = srv_table_get_nth_slot(slot_no);
@@ -735,7 +735,8 @@
                        if (srv_print_thread_releases) {
                                fprintf(stderr,
                "Releasing thread %lu type %lu from slot %lu meter %lu\n",
-                               (ulong) slot->id, (ulong) type, (ulong) i,
+                               (ulong) os_thread_pf(slot->id),
+                               (ulong) type, (ulong) i,
                                (ulong) srv_meter[SRV_RECOVERY]);
                        }
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to