[PATCH] gccattributes.h: define gccattr_returns_twice

2021-06-14 Thread Jesse Young
Signed-off-by: Jesse Young 

---
 For some out-of-tree code that wraps clone(), using setjmp()/longjmp()
 making it behave more like fork().

 src/include/skalibs/gccattributes.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/include/skalibs/gccattributes.h 
b/src/include/skalibs/gccattributes.h
index 0584480..7892687 100644
--- a/src/include/skalibs/gccattributes.h
+++ b/src/include/skalibs/gccattributes.h
@@ -6,6 +6,7 @@
 #ifdef __GNUC__
 
 #define gccattr_noreturn __attribute__((__noreturn__))
+#define gccattr_returns_twice __attribute__((__returns_twice__))
 #define gccattr_noinline __attribute__((__noinline__))
 #define gccattr_inline __attribute__((__always_inline__))
 #define gccattr_const __attribute__((__const__))
@@ -31,6 +32,7 @@
 #else
 
 #define gccattr_noreturn
+#define gccattr_returns_twice
 #define gccattr_noinline
 #define gccattr_inline
 #define gccattr_const
@@ -46,6 +48,7 @@
 
 #ifdef GCCATTR_COMPAT_0_22
 #define _a_noreturn gccattr_noreturn
+#define _a_returns_twice gccattr_returns_twice
 #define _a_noinline gccattr_noinline
 #define _a_inline gccattr_inline
 #define _a_const gccattr_const
-- 
2.32.0



Re: [PATCH 1/2] doc: reconcile openwrite{,v}nclose_suffix{,_devino}{,_sync} with djbunix.h

2021-06-14 Thread Laurent Bercot



 Contributions to... the skalibs documentation??
 Is this the real life? Is this just fantasy?

 Both patches applied, thanks!



 On closer inspection, I also discovered the devino variants have their
 arguments rearranged (except for *_internal).


 This bothers me though. I clearly didn't pay enough attention at
the time; but the arguments in *_internal should, if possible, have
the same order as in the high-level macros. Expect the signature of
*_internal to change in the next major skalibs update: this should
not break any user code (the _internal functions are, by definition,
not exactly supposed to be used directly) but it will require rebuilds.

--
 Laurent