<commit_before>dnl $Id$
dnl config.m4 for extension sync

PHP_ARG_ENABLE(sync, whether to enable synchronization object support (--enable-sync),
  [  --enable-sync           Enable synchronization object support])

if test "$PHP_SYNC" != "no"; then
  dnl # Check for sem_open() support.
  AC_MSG_CHECKING([for sem_open in -pthread -lrt])

  SAVED_LIBS="$LIBS"
  LIBS="$LIBS -pthread -lrt"

  AC_TRY_LINK([
    #include <fcntl.h>
    #include <semaphore.h>
  ], [
    sem_t *MxSemMutex = sem_open("", O_CREAT, 0666, 1);
  ], [
    have_sem_open=yes
    AC_MSG_RESULT([yes])
  ], [
    AC_MSG_ERROR([sem_open() is not available on this platform])
  ])

  dnl # Finish defining the basic extension support.
  AC_DEFINE(HAVE_SYNC, 1, [Whether you have synchronization object support])
  PHP_NEW_EXTENSION(sync, sync.c, $ext_shared)
fi<commit_msg>rt must be explicitly linked on old distro<commit_after>dnl $Id$
dnl config.m4 for extension sync

PHP_ARG_ENABLE(sync, whether to enable synchronization object support (--enable-sync),
  [  --enable-sync           Enable synchronization object support])

if test "$PHP_SYNC" != "no"; then
  dnl # Check for sem_open() support.
  AC_MSG_CHECKING([for sem_open in -pthread -lrt])

  SAVED_LIBS="$LIBS"
  LIBS="$LIBS -pthread -lrt"

  AC_TRY_LINK([
    #include <fcntl.h>
    #include <semaphore.h>
  ], [
    sem_t *MxSemMutex = sem_open("", O_CREAT, 0666, 1);
  ], [
    have_sem_open=yes
    AC_MSG_RESULT([yes])
  ], [
    AC_MSG_ERROR([sem_open() is not available on this platform])
  ])

  PHP_ADD_LIBRARY(rt,,SYNC_SHARED_LIBADD)
  PHP_SUBST(SYNC_SHARED_LIBADD)

  dnl # Finish defining the basic extension support.
  AC_DEFINE(HAVE_SYNC, 1, [Whether you have synchronization object support])
  PHP_NEW_EXTENSION(sync, sync.c, $ext_shared)
fi
{'fraction_non_alphanumeric': 0.11968680089485459, 'fraction_numerical': 0.007829977628635347, 'mean_word_length': 4.011204481792717, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1480707', 'n_tokens_mistral': 675, 'n_tokens_neox': 650, 'n_words': 164}