1. 31 Mar, 2022 1 commit
  2. 24 Mar, 2022 1 commit
  3. 23 Mar, 2022 1 commit
  4. 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>
      ed674b9e
  5. 25 Jan, 2022 1 commit
  6. 22 Dec, 2021 2 commits
  7. 10 Nov, 2021 1 commit
  8. 31 May, 2021 2 commits
  9. 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
      libpthread.
      
      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>
      6629a4b8
  10. 17 Nov, 2020 2 commits
  11. 24 Aug, 2020 1 commit
  12. 16 Dec, 2019 1 commit
  13. 18 Jul, 2019 2 commits
  14. 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
      exposed).
      
      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>
      575573b5
  15. 23 Jan, 2019 1 commit
  16. 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
      machine.
      
      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>
      377c1b91
  17. 02 Nov, 2018 1 commit
  18. 29 Oct, 2018 1 commit
  19. 26 Oct, 2018 4 commits
  20. 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>
      7a1d2dce
  21. 24 Oct, 2018 3 commits
  22. 16 Jul, 2018 2 commits
  23. 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.
      (EXTRA_DIST): Add 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>
      90e3dda0
  24. 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>
      f8b8e5d1
  25. 30 Nov, 2017 1 commit
  26. 02 Jun, 2017 2 commits
  27. 01 Jun, 2017 1 commit
  28. 16 May, 2017 2 commits