2014-10-31  Werner Koch  <wk@gnupg.org>

	Release 1.1.
	* configure.ac: Set LT version to C0/A0/R4.

2014-10-29  Werner Koch  <wk@gnupg.org>

	Allow use on systems which return ENOSYS for sem_init.
	* src/npth.c: Include some more headers.
	(sceptre_buffer): New.
	(sceptre): Change to a pointer and init to sceptre_buffer.
	(enter_npth, leave_npth): Adjust.
	(try_sem_open): New.
	(npth_init): Check for ENOSYS and use sem_open.

2014-09-18  Werner Koch  <wk@gnupg.org>

	Release 1.0.
	* configure.ac: Set LT version to C0/A0/R2.

2014-06-27  Werner Koch  <wk@gnupg.org>

	w32: Fix segv in npth_eselect.
	* w32/npth.c (npth_eselect): Obvious fix.

	w32: Change an npth_eselect arg to unsigned.
	* w32/npth.c (npth_eselect): Change arg EVENTS_SET to unsigned int.

2014-06-26  Werner Koch  <wk@gnupg.org>

	w32: Let npth_eselect return 0 for timeout. Fix replacement error codes.
	* w32/npth.c (npth_eselect): Remove debug output.  Return 0 for timeout.
	* w32/npth.h (ETIMEDOUT, EOPNOTSUPP):  Change to more correct values.

2014-02-19  Werner Koch  <wk@gnupg.org>

	w32: Make npth_eselect actually work.
	* w32/npth.c (npth_eselect): Rewrite.

	w32: Avoid calling FD_ISSET with a NULL fdset.
	* w32/npth.c (npth_eselect): Check fdset before callig FD_foo.

2014-01-10  Werner Koch  <wk@gnupg.org>

	Use the generic autogen.sh script.
	* autogen.rc: New.
	* Makefile.am (EXTRA_DIST): Add it.
	* autogen.sh: Update from GnuPG.

	Move helper scripts to build-aux.
	* config.guess, config.sub, depcomp, install-sh
	* ltmain.sh, missing: Move to build-aux/.
	* configure.ac (AC_CONFIG_AUX_DIR): New.
	(AM_SILENT_RULES): New.

2014-01-09  Werner Koch  <wk@gnupg.org>

	Fix creation of w32 npth-config tool.
	* src/npth-config.in: Move to ../.
	* src/npth.m4: Move to ../.
	* w32/npth-config.in: Remove.
	* w32/npth.m4: Remove.
	* Makefile.am (EXTRA_DIST): Add npth-config.in and npth.m4.
	(bin_SCRIPTS): new.
	(m4datadir, m4data_DATA): New.
	* configure.ac (AC_CONFIG_FILES): Adjust accordingly.

	Add configure option --enable-silent-rules.
	* configure.ac: Add AM_SILENT_RULES.

	Update libtool to support Android.
	* m4/libtool.m4: Add "linux*android*" case.  Taken from the
	libgpg-error.

	Update config.{guess.sub} to a decent version (2013-11-29)

	Add hack to have different names for 64 bit Windows DLLs.
	* ltmain.sh: Prefix the SO number for W64 with a "6".

	Fix libtool 2.4.2 to correctly detect .def files.
	* ltmain.sh (sed_uncomment_deffile): New.
	(orig_export_symbols): Uncomment def file before testing for EXPORTS.
	* m4/libtool.m4: Do the same for the generated code.

	Update libtool to Debian's 2.4.2.

	w32: Fix build problems with current compilers.
	* configure.ac (NTELIBS): ac_subst for W32.
	* w32/npth.h (struct timespec): Do not define for current mingw-w64
	versions.

2013-12-10  NIIBE Yutaka  <gniibe@fsij.org>

	Conditionalize use of pthread_atfork.
	* configure.ac: Add checking pthread_atfork.

	* src/npth-sigev.c (npth_sigev_fini): Call pthread_atfork only when
	it's available.

2013-07-03  NIIBE Yutaka  <gniibe@fsij.org>

	Restore sigmask at fork.
	* src/npth-sigev.c (restore_sigmask_for_child_process): New.
	(npth_sigev_fini): Register restore_sigmask_for_child_process.

2012-11-21  Ben Kibbey  <bjk@luxsci.net>

	Build fix for NetBSD.
	* src/npth.c (npth_setname_np): conditional check for __NetBSD__ and
	adapt correct parameters.

2012-11-16  Werner Koch  <wk@gnupg.org>

	Improve parsing of the GIT revision number.
	* configure.ac (git_revision): Use git rev-parse.

	Fix non-portable use of chmod in autogen.sh.
	* autogen.sh: Remove option -c from chmod.

2012-09-26  Werner Koch  <wk@gnupg.org>

	Make local variables configure hack more robust.
	* configure.ac (emacs_local_vars_begin): Use extra m4 quoting so that
	newer Emscasen won't take it up as Local Variables for this file.

2012-08-08  Werner Koch  <wk@gnupg.org>

	Release 0.91.
	* configure.ac: Bump LT version to C0/A0/R2.

2012-05-15  Werner Koch  <wk@gnupg.org>

	Really fix the version number parsing.
	* src/npth.m4 (_AM_PATH_NPTH_CONFIG, _AM_PATH_NPTH_CONFIG]: Fix last
	fix.  Print detected version number.  Print warning for non-matching
	host.

	Fix version number parsing in npth.m4.
	* src/npth.m4: Adjust for n.m style version numbers.

2012-05-10  Werner Koch  <wk@gnupg.org>

	Provide gettimeofday fallback for clock_gettime.
	* configure.ac (AC_CHECK_FUNCS): Check for gettimeofday.
	* src/npth.c (npth_clock_gettime): Use gettimeofday if clock_gettime
	is not available.

	Return an error if npth_rwlock_timedwrlock is not supported.
	* src/npth.c (npth_rwlock_timedwrlock): Return ENOSYS if there is no
	way to build it.

	Avoid compiler warning for debug variable.
	* src/npth.c (main_thread): Flag as volatile.

	Include required headers into pth.h.
	* src/npth.h.in: Include sys/time.h and signal.h.  Include time.h only
	if available.
	* configure.ac (INSERT_SYS_TIME_H, INSERT_TIME_H, INSERT_SIGNAL_H):
	Detect header files and ac_subst snippets.

	Remove obsolete debug stuff.
	* src/npth.c (enter_npth, leave_npth): Remove argument and debug
	stuff.
	(ENTER, LEAVE): Adjust macros accordingly.

	Add a basic create and join thread test case.
	* tests/t-thread.c: New
	* tests/t-support.h (opt_verbose):  New.
	(fail_msg, info_msg): New.

	Make npth_setname_np actually work.
	* src/npth.c (npth_setname_np): Fix typo in name and test macro.

	Check for -lsocket et al.
	* m4/libsocket.m4: New.  Stripped down from gnulib's socketlib.m4.
	* tests/Makefile.am (LDADD): Add LIBSOCKET.
	* configure.ac (NETLIBS): Remove because it is not used.
	(npth_LIBSOCKET): Call.

2012-05-09  Werner Koch  <wk@gnupg.org>

	Add a pselect emulation.
	* src/npth.c [!HAVE_PSELECT]: Include signal.h
	(npth_pselect) [!HAVE_PSELECT]: Implement a crude pselect emulation
	* configure.ac (AC_CHECK_FUNCS): Test for pselect.

	Cleanup the debug code.
	Debugging was only used for initial testing and there is no interface
	to enable it at runtime.  This change make the code a little bit
	cleaner.

	Take care of possible surprising sem_init implementations.
	* src/npth.c (npth_init): Return an error only for POSIX.1-2008.

	Make the t-mutex test more robust.
	* tests/t-support.h: Simplify.
	* tests/t-mutex.c: Include t-support.h.
	(main): Check each call and explicitly return 0.

	Let npth_init actually return an error.
	* src/npth.c (npth_init): Return ERRNO.

	Provide a replacement for socklen_t.
	* m4/socklen.m4, m4/sys_socket_h.m4: New.
	* configure.ac (INSERT_SOCKLEN_T): New.
	* src/npth.h.in (INSERT_SOCKLEN_T): New substitution.
	(npth_connect, npth_accept): Use _npth_socklen_t.

	Do not use ___FUNCTION__.
	* src/npth.c: Define replacement for __func__.
	(ENTER, LEAVE): Use __func__.

	Tweak for building with c99.
	* tests/Makefile.am (AM_CPPFLAGS): Add -D_POSIX_C_SOURCE=200112L.

	Add unistd.h is available.
	* configure.ac (AC_CHECK_HEADERS): Test for unistd.h.
	* src/npth.c [HAVE_UNISTD_H]: Include unistd.h.

2012-05-04  Werner Koch  <wk@gnupg.org>

	Implement git magic to create beta version numbers.
	* configure.ac (BUILD_FILEVERSION): Move after detection of W32.

	Release 0.90.
	* configure.ac: Bump LT version to C0/A0/R1.

2012-03-09  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Support Android API level earlier than 9.
	* src/npth.h [__ANDROID__]: Include <android/api-level.h>
	(_NPTH_NO_RWLOCK) [__ANDROID__ && __ANDROID_API__ < 9]: Define.
	(npth_rwlockattr_t, npth_rwlockattr_init, npth_rwlockattr_destroy,
	npth_rwlockattr_gettype_np, npth_rwlockattr_settype_np,
	NPTH_RWLOCK_PREFER_READER_NP, NPTH_RWLOCK_PREFER_WRITER_NP,
	NPTH_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, NPTH_RWLOCK_DEFAULT_NP,
	NPTH_RWLOCK_INITIALIZER, NPTH_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
	NPTH_MUTEX_INITIALIZER, npth_rwlock_t, npth_rwlock_init,
	npth_rwlock_destroy, npth_rwlock_tryrdlock, npth_rwlock_rdlock,
	npth_rwlock_trywrlock, npth_rwlock_timedrdlock, npth_rwlock_wrlock,
	npth_rwlock_rdlock, npth_rwlock_timedwrlock, npth_rwlock_unlock
	(_NPTH_NO_RWLOCK): Alternative implementation based on mutex.

2012-02-28  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Remove npth_yield.
	* src/npth.h.in (npth_yield): Macro removed (should have been a
	function anyway).
	* w32/npth.c (npth_yield): Remove function.
	* w32/npth.h (npth_yield): Remove prototype.
	* w32/npth.def (npth_yield): Remove symbol export.

	Make rwlock try and timed functions optional.
	* configure.ac: Check for pthread_rwlock_rdlock, pthread_rwlock_wrlock,
	pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
	pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock.
	* src/npth.c (trylock_func_t): New type.
	(busy_wait_for): New function.
	(npth_mutex_timedlock) [!HAVE_PTHREAD_MUTEX_TIMEDLOCK]: Reimplement
	in terms of busy_wait_for.
	(npth_rwlock_rdlock, npth_rwlock_timedrdlock)
	[!HAVE_PTHREAD_RWLOCK_TRYRDLOCK]: Skip trylock.
	(npth_rwlock_wrlock, npth_rwlock_timedwrlock)
	[!HAVE_PTHREAD_RWLOCK_TRYWRLOCK]: Skip trylock call.
	(npth_rwlock_timedrdlock) [!HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK]:
	Use busy_wait_for.
	(npth_rwlock_timedwrlock) [!HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK]:
	Use busy_wait_for.

	Add generated files src/npth.h and w32/npth-config.

2012-02-08  Marcus Brinkmann  <mb@g10code.com>

	Fix include path for non-w32 builds.
	* tests/Makefile.am (AM_CPPFLAGS) [!HAVE_W32_SYSTEM]:
	Locate header in build dir, not src.

2012-01-31  Marcus Brinkmann  <mb@g10code.com>

	Implement npth_mutex_timedlock for inferior systems.
	* configure.ac: Check for pthread_mutex_timedlock.
	* src/npth.c (BUSY_WAIT_INTERVAL): New macro.
	(npth_mutex_timedlock): If pthread_mutex_timedlock is missing,
	use a poke-the-stick-at-it strategy.

2012-01-27  Werner Koch  <wk@gnupg.org>

	Include sys/select.h if needed.
	* src/npth.h: Rename to npth.h.in.  Include sys/select.h if
	available. Add usual read-only comments.
	* configure.ac: Create npth.h.
	(INSERT_SYS_SELECT_N): New
	(emacs_local_vars_read_only): New vars to support read-only switching.

	Update config.guess and config.sub.
	* config.guess, config.sub: Update to version 2012-01-01.
	* autogen.sh: Fix typo.

	Encapsulate clock_gettime.
	* src/Makefile.am (libnpth_la_LDFLAGS): Remove -pthread and -lrt.
	* src/npth.h (npth_clock_gettime): Turn macro into a function.
	* src/npth.c (npth_clock_gettime): New.
	* src/libnpth.vers: Add npth_clock_gettime.

	Improve pthread library detection.
	* configure.ac: Reorder some code.  Improve pthread test to take libc
	in account.  Generate NPTH_CONFIG_LIBS from tests.
	* src/npth-config.in: Use NPTH_CONFIG_LIBS.
	* w32/npth-config.in: Ditto.
	* tests/Makefile.am (AM_CPPFLAGS, AM_LDFLAGS): Don not pass -pthread.

2012-01-26  Werner Koch  <wk@gnupg.org>

	Remove unused include files from npth.h.
	* src/npth.h: Remove unused poll.h and errno.h includes.

	Make npth_{s,g}etname_np portable.
	These functions are usually used for debugging.  On systems where
	they are not easy to support they will now simply return ENOSYS.
	* configure.ac: Check for pthread_setname_np and pthread_getname_np.
	* src/libnpth.vers: Add npth_setname_np and npth_getname_np.
	* src/npth.c (npth_setname_np, npth_getname_np): New.
	* src/npth.h (npth_setname_np, npth_getname_np): Turn macros into
	functions.

	Check for the non-portable pthread_tryjoin_np.
	* configure.ac: Check for pthread_tryjoin_np.  Also rework the pthread
	test to update LIBS
	* src/npth.c (npth_join) [HAVE_PTHREAD_TRYJOIN_NP]: Use
	pthread_tryjoin_np only if available.

2012-01-25  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Fix thread startup.
	* src/npth.c (npth_create): Fix startup data use.

2012-01-25  Werner Koch  <wk@gnupg.org>

	Include stdlib.h for malloc prototypes.
	* src/npth.c: Include stdlib.h.

2012-01-24  Werner Koch  <wk@gnupg.org>

	Require gitlog-to-changelog to be installed.
	* Makefile.am (gen-ChangeLog): Do no use included gitlog-to-changelog.
	Use options --append-dot and --tear-off.
	* build-aux/gitlog-to-changelog: Remove from repo.

2012-01-23  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Allow manually unprotect/protect calls.
	* src/libnpth.vers (npth_unprotect, npth_protect): New symbols.
	* src/npth.c (npth_unprotect, npth_protect): New functions.
	* src/npth.h (npth_unprotect, npth_protect): New declaration.
	* w32/npth.def (npth_unprotect, npth_protect): New exports.
	* w32/npth.c (npth_unprotect, npth_protect): New functions.
	* w32/npth.h (npth_unprotect, npth_protect): New declaration.

2012-01-19  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Allow no extra events in npth_eselect.
	* w32/npth.c (npth_eselect): Allow events to be NULL.

	Implement ability to wait on sockets and events.
	* w32/npth.c (npth_eselect): New function.
	* w32/npth.h (npth_eselect): New declaration.
	* w32/npth.def (npth_eselect): New export.

	Remove libnpth.vers dependency.
	* w32/Makefile.am (libnpth_la_DEPENDENCIES): Remove libnpth.vers.

	Release mutex temporarily on instant timeout in npth_cond_timedwait.
	* w32/npth.c (npth_cond_timedwait): Release mutex temporarily even on
	instant timeout.

2012-01-13  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Remove obsolete file.
	* src/Makefile.am (EXTRA_DIST): Remove npth.def
	* src/npth.def: Removed.

	Initial support for w32.
	* Makefile.am [HAVE_W32_SYSTEM]: Build from w32 directory.
	* configure.ac: Don't check for pthread on windows.  Add winsock
	library on windows.  Add w32 subdirectory to config files.
	* w32/npth.h, w32/npth.c, w32/Makefile.am, w32/npth.def,
	w32/npth-config.in, w32/npth.m4: New files.
	* tests/Makefile.am: Allow building on w32.

	Add missing function npth_system.
	* src/npth.c (npth_system): New function.

2012-01-11  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Remove duplicated macro.
	* npth.h (PTHREAD_RWLOCK_INITIALIZER): Remove.

	Add some missing interfaces.
	* npth.h (npth_key_delete, NPTH_ERRORCHECK_MUTEX_INITIALIZER_NP,
	npth_rwlockattr_t, npth_rwlockattr_init, npth_rwlockattr_destroy,
	npth_rwlockattr_gettype_np, npth_rwlockattr_settype_np,
	NPTH_RWLOCK_PREFER_READER_NP, NPTH_RWLOCK_PREFER_WRITER_NP,
	NPTH_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, NPTH_RWLOCK_DEFAULT_NP,
	NPTH_RWLOCK_INITIALIZER, NPTH_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP):
	New macros.
	(NPTH_RWLOCK_INIT): Rename to ...
	(NPTH_RWLOCK_INITIALIZER): ... this.

2012-01-06  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Fix exclusion logic at thread creation and allow main thread to exit.
	* libnpth.vers (npth_create, npth_exit): New.
	* npth.def (npth_create, npth_exit): Likewise.
	* npth.h (npth_create): Change from macro to declaration.
	(npth_exit): New declaration.
	* npth.c (startup_s): New struct.
	(thread_startup, npth_create, npth_exit): New functions.

2011-12-06  Werner Koch  <wk@gnupg.org>

	Create the ChangeLog from the git commit log.
	* autogen.sh: Install git commit log checker.
	* build-aux/git-hooks/commit-msg: New.  Repo only.
	* build-aux/git-log-fix: New.  Repo only.
	* build-aux/git-log-footer: New.  Repo only.
	* build-aux/gitlog-to-changelog: New.  Repo only.
	* HACKING: New.
	* Makefile.am (gen-Changelog): New rule.
	(dist-hook):  Depend on gen-Changelog.
	(EXTRA_DIST): Add HACKING.
	* ChangeLog: New stub file.

2011-11-07  Marcus Brinkmann  <marcus@g10code.com>

	* src/npth.c (leave_npth): Loop over sem_wait on EINTR.

2011-10-26  Marcus Brinkmann  <marcus@g10code.com>

	* src/npth.h (npth_mutex_destroy): Add it.
	(npth_join): Make it a proper function.
	(_npth_mutex_lock, _npth_mutex_timedlock, _npth_rwlock_rdlock)
	(_npth_rwlock_timedrdlock, _npth_rwlock_wrlock)
	(_npth_rwlock_timedwrlock): Renamed to the variant without the
	leading underscore.  There was no reason to have the static
	function wrappers.
	* src/npth.c: Corresponding changes here.
	* src/npth.def: Also here.
	* src/libnpth.vers: Likewise.

2011-10-07  Marcus Brinkmann  <marcus@g10code.com>

	* src/npth.h (npth_mutexattr_t, npth_mutexattr_init)
	(npth_mutexattr_destroy, npth_mutexattr_settype)
	(npth_mutexattr_gettype, NPTH_MUTEX_NORMAL, NPTH_MUTEX_RECURSIVE)
	(NPTH_MUTEX_ERRORCHECK, NPTH_MUTEX_DEFAULT): New.
	* src/npth.c (npth_mutex_init): Removed.
	* src/libnpth.vers: Remove npth_mutex_init.
	* src/npth.def: Likewise.  Add missing numbers.
	* tests/t-mutex.c: Adjust to new interface.

2011-10-06  Marcus Brinkmann  <marcus@g10code.com>

	* Initial version.

        -----
	Copyright (C) 2011 g10 Code GmbH

	Copying and distribution of this file and/or the original GIT
	commit log messages, with or without modification, are
	permitted provided the copyright notice and this notice are
	preserved.
