On 13/12/19 18:54 +0100, Olivier Hainque wrote:

This change adjusts the libstdc++ configuration for VxWorks
to set ac_has_nanosleep=yes, which enables the use of nanosleep
from the library.

While this technically depends on the kernel configuration
(INCLUDE_POSIX_TIMERS) this is the normal configuration in all
the environments we have been given to work with for the past
decade and activating this improves the library in our experience.

Is there a way to detect that more reliably? Should we replicate the
test used later in the file, to detect whether the timers are really
enabled for VxWorks?

      AC_MSG_CHECKING([for nanosleep])
      AC_TRY_LINK(
        [#include <unistd.h>
         #include <time.h>
        ],
        [#if _POSIX_TIMERS > 0
          timespec tp;
         #endif
          nanosleep(&tp, 0);
        ], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])

      AC_MSG_RESULT($ac_has_nanosleep)


You're the port maintainer though, so if you think that's not needed
then the patch is OK for trunk.

Reply via email to