On Thu, Jul 19, 2007 at 03:55:14PM +0000, Fabian wrote:
> Update of /cvsroot/monetdb/MonetDB/src/gdk
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4085
>
> Modified Files:
> gdk_system.mx
> Log Message:
> - added MT_join_thread to wait for a thread to exit
> - don't rely on the Apple compiler, but rely on the Mach-O system
> instead when trying to get around missing semaphore functionalities
OK, but shouldn't it be "__MACH__" instead of "__MACH_O__":
========
[EMAIL PROTECTED]::/tmp> uname -a
--------
Darwin horizon.cs.umass.edu 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23
16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
========
[EMAIL PROTECTED]::/tmp> cat x.c
--------
#include <stdlib.h>
#include <stdio.h>
int main () {
#ifdef __APPLE_CC__
printf("__APPLE_CC__ = %d\n", __APPLE_CC__);
#endif
#ifdef __MACH__
printf("__MACH__ = %d\n", __MACH__);
#endif
#ifdef __MACH_O__
printf("__MACH_O__ = %d\n", __MACH_O__);
#endif
return 0;
}
========
[EMAIL PROTECTED]::/tmp> gcc x.c -o x && ./x
--------
__APPLE_CC__ = 1809
__MACH__ = 1
========
[EMAIL PROTECTED]::/tmp> find /usr/include/ -type f | xargs grep --color -w
__MACH_O__
========
[EMAIL PROTECTED]::/tmp> find /usr/include/ -type f | xargs grep --color -w
__MACH__
--------
/usr/include//com_err.h:#if defined(macintosh) || (defined(__MACH__) &&
defined(__APPLE__))
/usr/include//des.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//gcc/darwin/3.3/c++/cctype:#if defined(__APPLE__) &&
defined(__MACH__)
Binary file
/usr/include//gcc/darwin/4.0/c++/i686-apple-darwin8/bits/stdc++.h.gch/O0g.gch
matches
Binary file
/usr/include//gcc/darwin/4.0/c++/i686-apple-darwin8/bits/stdc++.h.gch/O2g.gch
matches
Binary file
/usr/include//gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/stdc++.h.gch/O0g.gch
matches
Binary file
/usr/include//gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/stdc++.h.gch/O2g.gch
matches
/usr/include//gssapi/gssapi.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//kerberosIV/des.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//kerberosIV/krb.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//krb.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//krb5.h:#if defined(__MACH__) && defined(__APPLE__)
Binary file /usr/include//libc-gcc3.p matches
Binary file /usr/include//mach/mach-gcc3.p matches
/usr/include//profile.h:#if defined(__MACH__) && defined(__APPLE__)
/usr/include//TargetConditionals.h: #ifdef __MACH__
/usr/include//TargetConditionals.h: #ifdef __MACH__
/usr/include//tidy/platform.h:#elif defined(__APPLE__) && defined(__MACH__)
Binary file /usr/include//unistd-gcc3.p matches
/usr/include//wx-2.5/wx/defs.h: #if defined(__MACH__) &&
!defined(SIZEOF_WCHAR_T)
/usr/include//wx-2.5/wx/filefn.h: #ifdef __MACH__
/usr/include//wx-2.5/wx/filefn.h: #if !defined(__WXMAC__) ||
defined(__UNIX__) || defined(__MACH__)
/usr/include//wx-2.5/wx/filefn.h:#elif defined(__MWERKS__) &&
!defined(__INTEL__) && !defined(__MACH__)
/usr/include//wx-2.5/wx/platform.h: #if defined(__MACH__)
/usr/include//wx-2.5/wx/wxchar.h:#if defined(__MWERKS__) && !defined(__MACH__)
/usr/include//wx-2.5/wx/wxchar.h: #elif defined(__MWERKS__) && (
defined(__MSL__) || defined(__MACH__) )
/usr/include//wx-2.5/wx/wxchar.h: #ifdef __MACH__
/usr/include//wx-2.5/wx/wxchar.h: #if defined(__MWERKS__) &&
!defined(__MACH__) && (__MSL__ < 0x00008000)
========
??
*Maybe*, that would help to get client tests on MacOS X / Darwin (on PowerPC)
working, again ...
Stefan
>
> Index: gdk_system.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_system.mx,v
> retrieving revision 1.103
> retrieving revision 1.104
> diff -u -d -r1.103 -r1.104
> --- gdk_system.mx 2 May 2007 16:17:00 -0000 1.103
> +++ gdk_system.mx 19 Jul 2007 15:55:11 -0000 1.104
> @@ -143,6 +143,7 @@
> gdk_export void MT_exit_thread(int status);
> gdk_export void MT_global_exit(int status);
> gdk_export MT_Id MT_getpid(void);
> +gdk_export int MT_join_thread(MT_Id t);
> gdk_export int MT_kill_thread(MT_Id t);
>
> #ifdef HAVE_PTHREAD_SIGMASK
> @@ -187,7 +188,7 @@
>
> @- MT Semaphore API
> @h
> -#if defined(_AIX) || defined(__APPLE_CC__)
> +#if defined(_AIX) || defined(__MACH_O__)
> typedef struct {
> int cnt;
> pthread_mutex_t mutex;
> @@ -425,6 +426,12 @@
> pthread_exit(&st);
> }
>
> +int
> +MT_join_thread(MT_Id t)
> +{
> + return pthread_join((pthread_t)(t - 1), NULL);
> +}
> +
>
> int
> MT_kill_thread(MT_Id t)
> @@ -439,7 +446,7 @@
> #endif
> }
>
> -#if defined(_AIX) || defined(__APPLE_CC__)
> +#if defined(_AIX) || defined(__MACH_O__)
> void
> pthread_sema_init(pthread_sema_t *s, int flag, int nresources)
> {
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
--
| Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers