På søndag 5. juli 2026 kl. 11:13, skrev Matthieu Herrb
<[email protected]>:

> On Thu, Jul 02, 2026 at 01:06:28PM +0100, Stuart Henderson wrote:
> > On 2026/07/02 13:31, Christian Schulte wrote:
> > > Hi maintainers,
> > >
> > > the manual of function thrd_sleep as documented in thrd_create.3
> > > in package devel/libstdthreads contains incorrect information. The same
> > > page is served at man.freebsd.org and contains the same incorrect
> > > return value section there as well. I think this should be fixed.
> > > Following that manual one is lead to checking for thrd_success which
> > > happens to be zero on some platforms, but not BSD. Reading that manual
> > > should not lead to broken code only working by accident on other platforms
> > > but BSD.
> >
> > +cc matthieu@
> >
> > Should we also mention the need to check errno? It's noted in
> > https://pubs.opengroup.org/onlinepubs/9799919799/functions/thrd_sleep.html
> >
> > Updated diff below
> >
> 
> Hi,
> 
> Sorry for the delay. I've rolled up libpthread 0.3.3 including this
> and the othwr patch from the port. Updated port below. ok ?
> 


Tested on current/amd64 with privsep

$ cd /usr/ports/devel/libstdthreads/ && patch -l -p0 -E < 
/tmp/libstdthreads-0.3.3.diff

$ cd /usr/ports/devel/libstdthreads/ && make patch build update-plist package 
test ; make port-lib-depends-check check-shlib-syms

No regression tests for libstdthreads-0.3.3
/usr/local/lib/libstdthreads.so.0.0 --> 
/usr/ports/pobj/libstdthreads-0.3.3/fake-amd64/usr/local/lib/libstdthreads.so.0.0
No dynamic export changes
--
// No plist changes, checks are have no problems.


# TRUSTED_PKG_PATH=/usr/ports/packages/amd64/all pkg_add -Dsnap -u libstdthreads
libstdthreads-0.3.2p2->0.3.3: ok

Fuzzel and niri(some reverse deps I checked with 'show-reverse-deps
devel/libstdthreads' from the sqlports package) keep running with this
update.

A space/tab nit possibly on line:
+DISTFILES =     ${DISTNAME}.tar.gz

Otherwise looks fine to me.

Hope this helps and may you have good and cool one along with success
in your endeavours.
--
yaydn

> Index: Makefile
> ===================================================================
> RCS file: /local/cvs/ports/devel/libstdthreads/Makefile,v
> diff -u -p -u -r1.6 Makefile
> --- Makefile  17 Nov 2025 19:25:59 -0000      1.6
> +++ Makefile  5 Jul 2026 09:10:39 -0000
> @@ -1,13 +1,12 @@
>  COMMENT = C11 standard threads library
> 
>  DISTNAME =   libstdthreads-${V}
> -V =          0.3.2
> -REVISION =   2
> +V =          0.3.3
> 
>  CATEGORIES = devel
> 
> -SITES =      https://code.tetaneutral.net/mherrb/libstdthreads//archive/
> -DISTFILES =     ${DISTNAME}-1{${DISTNAME}}.tar.gz
> +SITES =      https://code.tetaneutral.net/mherrb/libstdthreads/archive/
> +DISTFILES =     ${DISTNAME}.tar.gz
> 
>  SHARED_LIBS +=  stdthreads                0.0 # 0.0
> 
> Index: distinfo
> ===================================================================
> RCS file: /local/cvs/ports/devel/libstdthreads/distinfo,v
> diff -u -p -u -r1.2 distinfo
> --- distinfo  2 Jun 2025 19:01:58 -0000       1.2
> +++ distinfo  5 Jul 2026 09:10:39 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (libstdthreads-0.3.2-1.tar.gz) = 
> qM6Qrvd20qPB1Nvt+e0FJzWx/ccvFDmweFwM8qo1WSc=
> -SIZE (libstdthreads-0.3.2-1.tar.gz) = 6359
> +SHA256 (libstdthreads-0.3.3.tar.gz) = 
> cjhgX/LacmSHLNZxehHELaQM6vtPFxc8GluX6Z1tZ3Q=
> +SIZE (libstdthreads-0.3.3.tar.gz) = 6527
> Index: patches/patch-threads_h
> ===================================================================
> RCS file: patches/patch-threads_h
> diff -N patches/patch-threads_h
> --- patches/patch-threads_h   17 Nov 2025 19:25:59 -0000      1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,26 +0,0 @@
> -__has_extension support added in gcc >= 14
> -Fixup mtx_t definition to miror pthread_mutex_t
> -
> -Index: threads.h
> ---- threads.h.orig
> -+++ threads.h
> -@@ -45,6 +45,10 @@
> -  * held.
> -  */
> -
> -+#ifndef __has_extension
> -+#define __has_extension(_e) 0
> -+#endif
> -+
> - #if __has_extension(c_thread_safety_attributes)
> - #define     __lock_annotate(x)      __attribute__((x))
> - #else
> -@@ -97,7 +101,7 @@
> -  */
> -
> - typedef struct pthread_cond *cnd_t;
> --typedef struct pthread_mutex        *mtx_t;
> -+typedef volatile struct pthread_mutex       *mtx_t;
> - typedef struct pthread              *thrd_t;
> - typedef int                  tss_t;
> -
> 
> --
> Matthieu Herrb
> 
>

Reply via email to