Hello community,
here is the log from the commit of package npth for openSUSE:Factory checked in at 2014-11-04 17:29:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/npth (Old)
and /work/SRC/openSUSE:Factory/.npth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "npth"
Changes:
--------
--- /work/SRC/openSUSE:Factory/npth/npth.changes 2014-09-26 11:21:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.npth.new/npth.changes 2014-11-04 17:29:49.000000000 +0100
@@ -1,0 +2,6 @@
+Sun Nov 2 21:10:41 UTC 2014 - andreas.stieger@gmx.de
+
+- npth 1.1:
+ * fixes for platforms other than GNU/Linux
+
+-------------------------------------------------------------------
Old:
----
npth-1.0.tar.bz2
npth-1.0.tar.bz2.sig
New:
----
npth-1.1.tar.bz2
npth-1.1.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ npth.spec ++++++
--- /var/tmp/diff_new_pack.hb12Tk/_old 2014-11-04 17:29:50.000000000 +0100
+++ /var/tmp/diff_new_pack.hb12Tk/_new 2014-11-04 17:29:50.000000000 +0100
@@ -18,7 +18,7 @@
Name: npth
%define lname libnpth0
-Version: 1.0
+Version: 1.1
Release: 0
Summary: New GNU Portable Threads library
License: LGPL-3.0+ or GPL-2.0+
++++++ npth-1.0.tar.bz2 -> npth-1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/ChangeLog new/npth-1.1/ChangeLog
--- old/npth-1.0/ChangeLog 2014-09-18 08:09:54.000000000 +0200
+++ new/npth-1.1/ChangeLog 2014-10-31 07:52:35.000000000 +0100
@@ -1,3 +1,18 @@
+2014-10-31 Werner Koch
+
+ Release 1.1.
+ * configure.ac: Set LT version to C0/A0/R4.
+
+2014-10-29 Werner Koch
+
+ 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
Release 1.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/NEWS new/npth-1.1/NEWS
--- old/npth-1.0/NEWS 2014-09-18 08:05:46.000000000 +0200
+++ new/npth-1.1/NEWS 2014-10-31 07:47:09.000000000 +0100
@@ -1,3 +1,9 @@
+Noteworthy changes in version 1.1 (2014-10-31)
+----------------------------------------------
+
+ * Make it work on OS X and some other systems.
+
+
Noteworthy changes in version 1.0 (2014-09-18)
----------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/VERSION new/npth-1.1/VERSION
--- old/npth-1.0/VERSION 2014-09-18 08:09:54.000000000 +0200
+++ new/npth-1.1/VERSION 2014-10-31 07:52:35.000000000 +0100
@@ -1 +1 @@
-1.0
+1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/configure new/npth-1.1/configure
--- old/npth-1.0/configure 2014-09-18 08:09:08.000000000 +0200
+++ new/npth-1.1/configure 2014-10-31 07:52:07.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for npth 1.0.
+# Generated by GNU Autoconf 2.69 for npth 1.1.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='npth'
PACKAGE_TARNAME='npth'
-PACKAGE_VERSION='1.0'
-PACKAGE_STRING='npth 1.0'
+PACKAGE_VERSION='1.1'
+PACKAGE_STRING='npth 1.1'
PACKAGE_BUGREPORT='gnupg-devel@gnupg.org'
PACKAGE_URL=''
@@ -1347,7 +1347,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures npth 1.0 to adapt to many kinds of systems.
+\`configure' configures npth 1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1417,7 +1417,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of npth 1.0:";;
+ short | recursive ) echo "Configuration of npth 1.1:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-npth configure 1.0
+npth configure 1.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1946,7 +1946,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by npth $as_me 1.0, which was
+It was created by npth $as_me 1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2304,7 +2304,7 @@
#
LIBNPTH_LT_CURRENT=0
LIBNPTH_LT_AGE=0
-LIBNPTH_LT_REVISION=3
+LIBNPTH_LT_REVISION=4
# If the API is changed in an incompatible way: increment the next counter.
NPTH_CONFIG_API_VERSION=1
@@ -12794,7 +12794,7 @@
BUILD_TIMESTAMP=`date --iso-8601=minutes`
BUILD_ISODATE=`date --iso-8601`
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
- BUILD_FILEVERSION="${BUILD_FILEVERSION}31227"
+ BUILD_FILEVERSION="${BUILD_FILEVERSION}31281"
fi
@@ -13950,7 +13950,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by npth $as_me 1.0, which was
+This file was extended by npth $as_me 1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14016,7 +14016,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-npth config.status 1.0
+npth config.status 1.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -16012,6 +16012,6 @@
echo "
$PACKAGE_NAME-$PACKAGE_VERSION prepared for make
- Revision: 79fbdce (31227)
+ Revision: 7a3175b (31281)
Platform: $host
"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/configure.ac new/npth-1.1/configure.ac
--- old/npth-1.0/configure.ac 2014-09-18 08:04:42.000000000 +0200
+++ new/npth-1.1/configure.ac 2014-10-31 07:49:11.000000000 +0100
@@ -35,7 +35,7 @@
# the version number immediately after the release and do another
# commit and push so that the git magic is able to work.
# See below for the LT versions.
-m4_define(my_version, [1.0])
+m4_define(my_version, [1.1])
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
@@ -61,7 +61,7 @@
#
LIBNPTH_LT_CURRENT=0
LIBNPTH_LT_AGE=0
-LIBNPTH_LT_REVISION=3
+LIBNPTH_LT_REVISION=4
# If the API is changed in an incompatible way: increment the next counter.
NPTH_CONFIG_API_VERSION=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/npth.spec new/npth-1.1/npth.spec
--- old/npth-1.0/npth.spec 2014-09-18 08:09:54.000000000 +0200
+++ new/npth-1.1/npth.spec 2014-10-31 07:52:35.000000000 +0100
@@ -1,7 +1,7 @@
# This is a template. The dist target uses it to create the real file.
Summary: NPTH - the new GNU Portable Threads Library
Name: npth
-Version: 1.0
+Version: 1.1
Release: 1
URL: http://www.gnupg.org/
Source: ftp://ftp.gnupg.org/gcrypt/alpha
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/npth-1.0/src/npth.c new/npth-1.1/src/npth.c
--- old/npth-1.0/src/npth.c 2014-06-26 15:08:30.000000000 +0200
+++ new/npth-1.1/src/npth.c 2014-10-29 12:20:38.000000000 +0100
@@ -32,9 +32,13 @@
#endif
#include
+#include
+#include
#include
#include
#include
+#include
+#include
#include
#ifdef HAVE_UNISTD_H
# include
@@ -51,8 +55,11 @@
the application or other libraries call fork(), including from a
signal handler. sem_post is async-signal-safe. (The reason a
semaphore is safe and a mutex is not safe is that a mutex has an
- owner, while a semaphore does not.) */
-static sem_t sceptre;
+ owner, while a semaphore does not.) We init sceptre to a static
+ buffer for use by sem_init; in case sem_open is used instead
+ SCEPTRE will changed to the value returned by sem_open. */
+static sem_t sceptre_buffer;
+static sem_t *sceptre = &sceptre_buffer;
/* The main thread is the active thread at the time pth_init was
called. As of now it is only useful for debugging. The volatile
@@ -112,7 +119,7 @@
{
int res;
- res = sem_post (&sceptre);
+ res = sem_post (sceptre);
assert (res == 0);
}
@@ -123,7 +130,7 @@
int res;
do {
- res = sem_wait (&sceptre);
+ res = sem_wait (sceptre);
} while (res < 0 && errno == EINTR);
assert (!res);
@@ -133,6 +140,34 @@
#define LEAVE() leave_npth ()
+static int
+try_sem_open (sem_t **r_sem)
+{
+ sem_t *sem;
+ char name [256];
+ int counter = 0;
+
+ do
+ {
+ snprintf (name, sizeof name - 1, "/npth-sceptre-%lu-%u",
+ (unsigned long)getpid (), counter);
+ name[sizeof name -1] = 0;
+ counter++;
+
+ sem = sem_open (name, (O_CREAT | O_EXCL), (S_IRUSR | S_IWUSR), 1);
+ if (sem != SEM_FAILED)
+ {
+ *r_sem = sem;
+ return 0;
+ }
+ fprintf (stderr, " semOpen(%s): %s\n", name, strerror (errno));
+ }
+ while (errno == EEXIST);
+
+ return -1;
+}
+
+
int
npth_init (void)
{
@@ -140,16 +175,32 @@
main_thread = pthread_self();
+ /* Better reset ERRNO so that we know that it has been set by
+ sem_init. */
+ errno = 0;
+
/* The semaphore is not shared and binary. */
- res = sem_init(&sceptre, 0, 1);
+ res = sem_init (sceptre, 0, 1);
if (res < 0)
{
- /* POSIX.1-2001 defines the semaphore interface but does not
- specify the return value for success. Thus we better bail
- out on error only on a POSIX.1-2008 system. */
+ /* Mac OSX and some AIX versions have sem_init but return
+ ENOSYS. This is allowed according to some POSIX versions but
+ the informative section is quite fuzzy about it. We resort
+ to sem_open in this case. */
+ if (errno == ENOSYS)
+ {
+ if (try_sem_open (&sceptre))
+ return errno;
+ }
+ else
+ {
+ /* POSIX.1-2001 defines the semaphore interface but does not
+ specify the return value for success. Thus we better
+ bail out on error only on a POSIX.1-2008 system. */
#if _POSIX_C_SOURCE >= 200809L
- return errno;
+ return errno;
#endif
+ }
}
LEAVE();
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org