[Python-Dev] Re: [Python-checkins] python/dist/src/Python thread_pthread.h, 2.53, 2.53.4.1
[EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25872 Modified Files: Tag: release24-maint thread_pthread.h Log Message: Patch #1163249 - Correctly handle _POSIX_SEMAPHORES == -1 to mean no support for posix semaphores. Index: thread_pthread.h === RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v retrieving revision 2.53 retrieving revision 2.53.4.1 diff -u -d -r2.53 -r2.53.4.1 --- thread_pthread.h 7 Jul 2004 17:44:12 - 2.53 +++ thread_pthread.h 16 Mar 2005 04:13:29 - 2.53.4.1 @@ -16,9 +16,13 @@ family of functions must indicate this by defining _POSIX_SEMAPHORES. */ #ifdef _POSIX_SEMAPHORES +#if _POSIX_SEMAPHORES == -1 +#define HAVE_BROKEN_POSIX_SEMAPHORES +#else #include semaphore.h #include errno.h #endif +#endif #if !defined(pthread_attr_default) # define pthread_attr_default ((pthread_attr_t *)NULL) ___ Python-checkins mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-checkins This change has broken the build on FreeBSD 4.x for me: gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - I. -I./Include -DPy_BUILD_CORE -o Python/thread.o Python/thread.c In file included from Python/thread.c:101: Python/thread_pthread.h:19: syntax error *** Error code 1 Backing it out allows the build to proceed there are no unexpected test failures. Compiler is gcc 2.95.4. Regards, Andrew. - Andrew I MacIntyre These thoughts are mine alone... E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370 [EMAIL PROTECTED] (alt) |Belconnen ACT 2616 Web:http://www.andymac.org/ |Australia ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Re: [Python-checkins] python/dist/src/Python thread_pthread.h, 2.53, 2.53.4.1
Andrew MacIntyre wrote: This change has broken the build on FreeBSD 4.x for me: gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - I. -I./Include -DPy_BUILD_CORE -o Python/thread.o Python/thread.c In file included from Python/thread.c:101: Python/thread_pthread.h:19: syntax error *** Error code 1 This should be fixed now, please try again and report whether it works. It would be really nice if you could try to analyse such problems deeper in the future. In this case, it would have helped if you had reported that _POSIX_SEMAPHORES is defined as #define _POSIX_SEMAPHORES so that the #if line expands to #if == -1 The standard solution in this case is to write #if (_POSIX_SEMAPHORES+0) == -1 so that it expands to a binary add if _POSIX_SEMAPHORES really is a number (as it should be, according to POSIX); if some system incorrectly defines _POSIX_SEMAPHORES to empty, you get #if (+0) == -1 which still should compile. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com