From 81a3e2b46db5474df3633b850805e5e981a6cbb4 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 29 Apr 2012 11:04:31 +0000 Subject: Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork). MFC after: 2 weeks --- include/setjmp.h | 6 +++--- include/unistd.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/setjmp.h b/include/setjmp.h index 49d4ed5..bf03f6f 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -46,16 +46,16 @@ __BEGIN_DECLS #if __BSD_VISIBLE || __XSI_VISIBLE >= 600 void _longjmp(jmp_buf, int) __dead2; -int _setjmp(jmp_buf); +int _setjmp(jmp_buf) __returns_twice; #endif void longjmp(jmp_buf, int) __dead2; #if __BSD_VISIBLE void longjmperror(void); #endif -int setjmp(jmp_buf); +int setjmp(jmp_buf) __returns_twice; #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE void siglongjmp(sigjmp_buf, int) __dead2; -int sigsetjmp(sigjmp_buf, int); +int sigsetjmp(sigjmp_buf, int) __returns_twice; #endif __END_DECLS diff --git a/include/unistd.h b/include/unistd.h index 90694ed..9b2f2ec 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -479,7 +479,7 @@ char *getwd(char *); /* obsoleted by getcwd() */ useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t); -pid_t vfork(void); +pid_t vfork(void) __returns_twice; #endif #if __BSD_VISIBLE -- cgit v1.1