Article delegate-en/4717 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A4716@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Delegate - AIX 6.1 Compilation Errors
17 Dec 2009 02:38:22 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

In message <_A4716@delegate-en.ML_> on 12/17/09(11:28:49)
you Antonio Hernandez Jr <payjabdyi-rcwevediz7tr.ml@ml.delegate.org> wrote:
 |Hi Yutaka,,
 |
 |It says of "conflicting types for 'thread_wait'".
 |
 |
 |$ nm -A maker/*.o | grep Thread
 |maker/nothread.o: .getThreadIds        T           0
 |maker/nothread.o: ThreadExit           D          76
 |maker/nothread.o: ThreadFork           D          60
 |maker/nothread.o: ThreadId             D          68
 |maker/nothread.o: ThreadWait           D          72
 |maker/nothread.o: ThreadYield          D          64
 |maker/nothread.o: WithThread           D          56
 |maker/nothread.o: getThreadIds         D          44
 |maker/nothread.o: getThreadIds         d          44          12
 |
 |
 |$ gcc -c -O2 -DQSC -Igen -Iinclude maker/__pthread_create.c
 |maker/__pthread_create.c:147: error: conflicting types for 'thread_wait'
 |/usr/include/sys/thread.h:1002: error: previous declaration of
 |'thread_wait' was here
 |
 |$ gcc -c -O2 -DQSC -Igen -Iinclude maker/__pthread_kill.c
 |maker/__pthread_kill.c:22: error: conflicting types for 'thread_kill'
 |/usr/include/sys/thread.h:972: error: previous declaration of 'thread_kill'
 |was here

Oh, I see.
Then renaming "thread_wait" to "_thread_wait" in __pthread_create.c and
"thread_kill" to "_thread_kill" in __ptheread_kill.c will fix the error.

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


diff -c dist/src/delegate9.9.7-pre8/maker/__pthread_create.c ./maker/__pthread_create.c
*** dist/src/delegate9.9.7-pre8/maker/__pthread_create.c	Tue Aug 25 19:24:12 2009
--- ./maker/__pthread_create.c	Thu Dec 17 11:34:22 2009
***************
*** 144,150 ****
  /*
  static int thread_wait(pthread_t tid,int timeout){
  */
! static int thread_wait(int tid,int timeout){
  	pthread_t tha;
  	int ser;
  	int err;
--- 144,150 ----
  /*
  static int thread_wait(pthread_t tid,int timeout){
  */
! static int _thread_wait(int tid,int timeout){
  	pthread_t tha;
  	int ser;
  	int err;
***************
*** 187,196 ****
  const char *WithThread = "PThread";
  /*
  pthread_t (*ThreadFork)(int,const char*,IFUNCP,...) = thread_fork;
! int (*ThreadWait)(int,int) = (int(*)(int,int))thread_wait;
  */
  int (*ThreadFork)(int,const char*,IFUNCP,...) = thread_fork;
! int (*ThreadWait)(int,int) = thread_wait;
  int (*ThreadYield)() = thread_yield;
  void (*ThreadExit)(void *code) = thread_exit;
  
--- 187,196 ----
  const char *WithThread = "PThread";
  /*
  pthread_t (*ThreadFork)(int,const char*,IFUNCP,...) = thread_fork;
! int (*ThreadWait)(int,int) = (int(*)(int,int))_thread_wait;
  */
  int (*ThreadFork)(int,const char*,IFUNCP,...) = thread_fork;
! int (*ThreadWait)(int,int) = _thread_wait;
  int (*ThreadYield)() = thread_yield;
  void (*ThreadExit)(void *code) = thread_exit;
  
diff -c dist/src/delegate9.9.7-pre8/maker/__pthread_kill.c ./maker/__pthread_kill.c
*** dist/src/delegate9.9.7-pre8/maker/__pthread_kill.c	Mon Aug 17 14:12:45 2009
--- ./maker/__pthread_kill.c	Thu Dec 17 11:35:03 2009
***************
*** 1,7 ****
  #include "ystring.h"
  #include "sysconf.h"
  #include "log.h"
! #if defined(__cplusplus) && !defined(DG_WITH_PTHREAD)
  	// and if -lpthread is not confirmed to be available
  	// then this module should not be included
  	// (as in small installation of FreeBSD 4)
--- 1,7 ----
  #include "ystring.h"
  #include "sysconf.h"
  #include "log.h"
! #if defined(__cplusplus) && !defined(DG_WITH_PTHREAD) && !defined(__CYGWIN__)
  	// and if -lpthread is not confirmed to be available
  	// then this module should not be included
  	// (as in small installation of FreeBSD 4)
***************
*** 19,25 ****
   */
  const void *toThd(int tid,int del,int *ser);
  
! static int thread_kill(unsigned int tidi,int sig){
  	pthread_t tid;
  	/*
  	tid = (pthread_t)tidi;
--- 19,25 ----
   */
  const void *toThd(int tid,int del,int *ser);
  
! static int _thread_kill(unsigned int tidi,int sig){
  	pthread_t tid;
  	/*
  	tid = (pthread_t)tidi;
***************
*** 39,48 ****
  	}
  	return pthread_kill(tid,sig);
  }
! int (*ThreadKill)(int,int) = (int(*)(int,int))thread_kill;
  
  static int thread_destroy(unsigned int tidi){
! 	return thread_kill(tidi,999);
  }
  int (*ThreadDestroy)(int) = (int(*)(int))thread_destroy;
  
--- 39,48 ----
  	}
  	return pthread_kill(tid,sig);
  }
! int (*ThreadKill)(int,int) = (int(*)(int,int))_thread_kill;
  
  static int thread_destroy(unsigned int tidi){
! 	return _thread_kill(tidi,999);
  }
  int (*ThreadDestroy)(int) = (int(*)(int))thread_destroy;
  

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V