[Ace-users] Re: [ACE Autoconf setup]: [ACE_HAS_POSIX_SEM_TIMEOUT
never defined under LINUX]
sowayan at gmail.com
sowayan at gmail.com
Sat Jul 28 07:14:43 CDT 2007
There were a lot of enhancements made to autoconf after ACE 5.5.9,
which ACE 5.5.10 will have these enhancements. I believe ACE 5.5.10
might be released very soon (next week). You could download the head
version from the SVN repository and try it out to see if this is still
On Jul 28, 5:43 am, Peter Korf <pe... at niendo.de> wrote:
> This problem is simular to BUG# 2836 - but here are two patches.
> And I'm not permitted to edit bugs in product ACE, so I can not attach them.
> ACE VERSION: 5.5.9
> HOST MACHINE and OPERATING SYSTEM:
> Linux 220.127.116.11-0.3-default #1 SMP
> x86_64 x86_64 x86_64 GNU/Linux
> SuSE 10.2
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)
> Neither ACE_HAS_POSIX_SEM_TIMEOUT or ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION can
> be defined using ./configure, because there is no AC_DEFINE for it.
> Using the traditional build (not with ./configure) everything works fine.
> But using the ./configure script ACE_HAS_POSIX_SEM_TIMEOUT will not defined,
> because there is no test or anything in configure.ac for it.
> In the traditional build this definition is set to 1 under Linux.
> Without ACE_HAS_POSIX_SEM_TIMEOUT ACE will not wait on a timed out acquire for
> a semaphore.
> This problem should be reproducible on all systems defining ACE_HAS_POSIX_SEM
> and using the configure script.
> REPEAT BY:
> Write a program containing this:
> ACE_Time_Value tv = ACE_Time_Value(10) + ACE_OS::gettimeofday();
> ACE_Semaphore* sem = new ACE_Semaphore(0);
> sem->acquire(tv); // <-- should wait 10 seconds
> delete sem;
> Using ./configure the program will not stop for 10 seconds.
> Without using ./configure it will wait.
> --- ACE-5.5.9_orig/ACE_wrappers/configure.ac 2007-05-24
> 05:45:22.000000000 +0000
> +++ ACE-5.5.9/ACE_wrappers/configure.ac 2007-07-27
> 06:16:11.000000000 +0000
> @@ -4405,6 +4405,10 @@
> + AC_CHECK_FUNC([pthread_cond_timedwait],
> + [AC_DEFINE([ACE_HAS_POSIX_SEM_TIMEOUT])],
> + [AC_DEFINE([ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION])])
> --- ACE-5.5.9_orig/ACE_wrappers/m4/config_h.m4 2006-12-14
> 00:14:22.000000000 +0000
> +++ ACE-5.5.9/ACE_wrappers/m4/config_h.m4 2007-07-27
> 06:43:41.000000000 +0000
> @@ -516,6 +516,12 @@
> [Platform supports POSIX real-time semaphores (e.g., VxWorks and
> +[Compiler supports timed mutex acquisitions (e.g.
> +[Emulation for timed mutex acquisitions.])
> [Platform supports the POSIX struct timespec type])
> IMPORTANT NOTES:
> I don't know what ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION is for, but it looks
> OK, if its defined here.
> Or the else entry in AC_CHECK_FUNC should be left empty.
> This is only tested on one system under one operating system!
> (Don't forget to run autoheader and autoconf after applying the patches)
> Thanks for developing and maintaing ACE,
More information about the Ace-users