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
  -I../../include  -I/opt/TWWfsw/readline50/include
  -I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/ncurses54/include
  -I/opt/TWWfsw/ncurses54/include/ncurses -D_REENTRANT  -DDBUG_OFF
  -DDBUG_OFF -O2 -march=1.1 -D_REENTRANT -DHAVE_BROKEN_SNPRINTF
  -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10
  -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT
  -DHAVE_POSIX1003_4a_MUTEX  -DDEBUG_OFF -DUNIV_MUST_NOT_INLINE
  -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]);
        }

The prototype for os_thread_get_curr_id() is:
  os_thread_id_t
  os_thread_get_curr_id(void);

os_thread_id_t is defined as:
  typedef struct CMA_T_HANDLE {
    cma_t_address field1;
    short int field2;
    short int field3;
  } cma_t_handle;
  typedef cma_t_handle cma_t_thread;
  typedef cma_t_thread pthread_t;
  typedef pthread_t os_thread_t;
  typedef os_thread_t os_thread_id_t;

So, gcc is complaining about the cast from cma_t_handle to ulong. What
should I do?

-- 
albert chin ([EMAIL PROTECTED])

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

Reply via email to