1. 17 Jan, 2023 1 commit
  2. 01 Nov, 2022 1 commit
  3. 05 Oct, 2022 1 commit
  4. 21 Sep, 2022 1 commit
  5. 20 Sep, 2022 1 commit
    • NIIBE Yutaka's avatar
      Don't use symbol/macro which starts with _. · 317885a6
      NIIBE Yutaka authored
      * configure.ac (npth_socklen_t): Rename from _npth_socklen_t.
      (NPTH_NO_RWLOCK): Rename from _NPTH_NO_RWLOCK.
      * src/npth-sigev.c (sigev_handler): Rename from _sigev_handler.
      * src/npth.c: Use NPTH_NO_RWLOCK.
      * src/npth.h.in: Use NPTH_H, NPTH_NO_RWLOCK, and npth_socklen_t.
      * w32/npth.c (npth_debug): Rename from _npth_debug.
      * w32/npth.h: Use NPTH_H.
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  6. 19 Jul, 2022 1 commit
  7. 31 Mar, 2022 1 commit
  8. 24 Mar, 2022 1 commit
  9. 23 Mar, 2022 1 commit
  10. 22 Mar, 2022 1 commit
    • NIIBE Yutaka's avatar
      w32: Don't allocate attribute internally. · ed674b9e
      NIIBE Yutaka authored
      * w32/npth.c (npth_create): Examine ->detachstate directly when
      USER_ATTR != NULL.  Remove allocation of ATTR.
      (npth_rwlock_init): Examine ->kind directly when USER_ATTR != NULL.
      Remove allocation of ATTR.
      (npth_clock_gettime): Remove unused USECS variable.
      (calculate_timeout, npth_tryjoin_np): Remove unused RES variable.
      (npth_join, onpth_mutex_trylock): Likewise.
      (npth_cond_broadcast): Remove unused ANY variable.
      (rwlock_init_check): It's not used, so, if-out by preprocessor.
      (npth_eselect): Remove unused sock_event_idx variable.
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  11. 25 Jan, 2022 1 commit
  12. 22 Dec, 2021 2 commits
  13. 10 Nov, 2021 1 commit
  14. 31 May, 2021 2 commits
  15. 14 May, 2021 1 commit
    • NIIBE Yutaka's avatar
      build: Fix detecting pthread library. · 6629a4b8
      NIIBE Yutaka authored
      * configure.ac: Use pthread_cancel to detect pthread library.
      In GNU C library, its routines support threading by changing its
      behavior at runtime, based on whether or not an application links to
      -lpthread.  Some pthreads functions are in libc, others are in
      Here, we try to detect the libpthread by testing a symbol which is
      only available in libpthread (not libc).  But, what symbol should be
      tested may vary by GNU C library implementations.
      So far, pthread_cancel is best one.
      Reported-by: Khem Raj
      Fixes-commit: 3a9d32eb
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  16. 17 Nov, 2020 2 commits
  17. 24 Aug, 2020 1 commit
  18. 16 Dec, 2019 1 commit
  19. 18 Jul, 2019 2 commits
  20. 15 May, 2019 1 commit
    • NIIBE Yutaka's avatar
      Limit exposing rwlock API on GNU/Linux. · 575573b5
      NIIBE Yutaka authored
      * configure.ac (INSERT_EXPOSE_RWLOCK_API): New.
      * src/npth.h.in: Use INSERT_EXPOSE_RWLOCK_API.
      * tests/Makefile.am (AM_CPPFLAGS): Remove _POSIX_C_SOURCE.
      Npth has rwlock implementation and offers its API.  It uses Pthread's
      rwlock API if available.
      On GNU/Linux, Pthread's rwlock API is only exposed when using newer
      POSIX API.  Because of this, we had -D_POSIX_C_SOURCE=200112L for our
      test programs (for the case using c99 executable, where the API is not
      This suggests that using Npth requires newer POSIX API.  It's not the
      case, actually.
      The right solution here is to limit exposing nPth's rwlock API, when
      older API is selected, just like Pthread's rwlock API.  Then, Npth can
      be used for building program with older API.
      Also, by removing -D_POSIX_C_SOURCE=200112L, it fixes build breakage
      on Solaris 11.
      GnuPG-bug-id: 4491
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  21. 23 Jan, 2019 1 commit
  22. 08 Nov, 2018 1 commit
    • NIIBE Yutaka's avatar
      w32: Use cast by uintptr_t for thread ID. · 377c1b91
      NIIBE Yutaka authored
      * w32/npth.c (npth_init): Cast with uintptr_t.
      (npth_setname_np, npth_create, npth_self): Likewise.
      In w32/npth.h, npth_t is unsigned long int type, which is 32-bit
      for both of 32-bit machine and 64-bit machine.
      We use TlsSetValue, TlsGetValue and CreateThread API to handle
      thread ID, which uses void * type, which is 64-bit on 64-bit
      Because the size is different on 64-bit machine, here, we use explicit
      cast to integer type which has enough size to have pointer.
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  23. 02 Nov, 2018 1 commit
  24. 29 Oct, 2018 1 commit
  25. 26 Oct, 2018 4 commits
  26. 25 Oct, 2018 1 commit
    • NIIBE Yutaka's avatar
      build: Relax requirement of gpg-error-config. · 7a1d2dce
      NIIBE Yutaka authored
      * npth.m4: Don't require AM_PATH_GPG_ERROR.
      New gpgrt-config is completely optional.  Configuring with old
      npth-config script is still supported (with no gpg-error).
      With new npth.pc file, developer can use PKG_CHECK_MODULES
      in pkg.m4 or npth.m4 with AM_PATH_GPG_ERROR in gpg-error.m4.
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  27. 24 Oct, 2018 3 commits
  28. 16 Jul, 2018 2 commits
  29. 11 Jul, 2018 1 commit
    • NIIBE Yutaka's avatar
      build: Let configure create the VERSION file. · 90e3dda0
      NIIBE Yutaka authored
      * autogen.sh: Update from libgpg-error.
      * configure.ac: Use mym4_* things to create VERSION file.
      * Makefile.am (dist-hook): Do not create VERSION.
      Now, configure displays
      	npth v1.6 prepared for make
      instead of "npth-1.6".
      GnuPG-bug-id: 3283
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>
  30. 27 May, 2018 1 commit
    • NIIBE Yutaka's avatar
      build: Fix libraries for HP-UX. · f8b8e5d1
      NIIBE Yutaka authored
      * configure.ac: HP-UX requires -lpthread and -lrt.
      Since HP-UX has stub for pthread functions in C library, it
      is required to link -lpthread.  POSIX semaphore functions like
      sem_init is required to link -lrt.  Tested on ia64-hp-hpux11.31.
      Reported-by: John Hirsch
      GnuPG-bug-id: 3980
      Signed-off-by: default avatarNIIBE Yutaka <gniibe@fsij.org>