Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add __returns_twice for the attribute of the same name. This...
details: https://anonhg.NetBSD.org/src/rev/1b24f180a428
branches: trunk
changeset: 770981:1b24f180a428
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Nov 05 09:27:06 2011 +0000
description:
Add __returns_twice for the attribute of the same name. This makes the
attribute explicit based on the functions GCC gives it too.
diffstat:
include/setjmp.h | 8 ++++----
include/ucontext.h | 4 ++--
include/unistd.h | 4 ++--
lib/libc/compat/include/setjmp.h | 10 +++++-----
sys/sys/cdefs.h | 8 +++++++-
sys/sys/systm.h | 4 ++--
6 files changed, 22 insertions(+), 16 deletions(-)
diffs (132 lines):
diff -r ea0555a6692c -r 1b24f180a428 include/setjmp.h
--- a/include/setjmp.h Sat Nov 05 09:22:43 2011 +0000
+++ b/include/setjmp.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setjmp.h,v 1.25 2009/08/12 04:57:36 matt Exp $ */
+/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -62,18 +62,18 @@
__BEGIN_DECLS
#ifndef __LIBC12_SOURCE__
-int setjmp(jmp_buf) __RENAME(__setjmp14);
+int setjmp(jmp_buf) __RENAME(__setjmp14) __returns_twice;
void longjmp(jmp_buf, int) __RENAME(__longjmp14) __dead;
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
-int sigsetjmp(sigjmp_buf, int) __RENAME(__sigsetjmp14);
+int sigsetjmp(sigjmp_buf, int) __RENAME(__sigsetjmp14) __returns_twice;
void siglongjmp(sigjmp_buf, int) __RENAME(__siglongjmp14) __dead;
#endif /* not ANSI */
#endif /* __LIBC12_SOURCE__ */
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
-int _setjmp(jmp_buf);
+int _setjmp(jmp_buf) __returns_twice;
void _longjmp(jmp_buf, int) __dead;
#endif
diff -r ea0555a6692c -r 1b24f180a428 include/ucontext.h
--- a/include/ucontext.h Sat Nov 05 09:22:43 2011 +0000
+++ b/include/ucontext.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucontext.h,v 1.6 2009/03/19 08:04:38 uebayasi Exp $ */
+/* $NetBSD: ucontext.h,v 1.7 2011/11/05 09:27:06 joerg Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/ucontext.h>
__BEGIN_DECLS
-int getcontext(ucontext_t *);
+int getcontext(ucontext_t *) __returns_twice;
int setcontext(const ucontext_t *);
void makecontext(ucontext_t *, void (*)(), int, ...);
int swapcontext(ucontext_t * __restrict, const ucontext_t * __restrict);
diff -r ea0555a6692c -r 1b24f180a428 include/unistd.h
--- a/include/unistd.h Sat Nov 05 09:22:43 2011 +0000
+++ b/include/unistd.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unistd.h,v 1.127 2011/08/08 12:08:53 manu Exp $ */
+/* $NetBSD: unistd.h,v 1.128 2011/11/05 09:27:06 joerg Exp $ */
/*-
* Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -274,7 +274,7 @@
useconds_t ualarm(useconds_t, useconds_t);
int usleep(useconds_t);
#ifndef __LIBC12_SOURCE__
-pid_t vfork(void) __RENAME(__vfork14);
+pid_t vfork(void) __RENAME(__vfork14) __returns_twice;
#endif
#ifndef __AUDIT__
diff -r ea0555a6692c -r 1b24f180a428 lib/libc/compat/include/setjmp.h
--- a/lib/libc/compat/include/setjmp.h Sat Nov 05 09:22:43 2011 +0000
+++ b/lib/libc/compat/include/setjmp.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setjmp.h,v 1.1 2005/09/13 01:44:09 christos Exp $ */
+/* $NetBSD: setjmp.h,v 1.2 2011/11/05 09:27:06 joerg Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -40,11 +40,11 @@
#define _COMPAT_SETJMP_H_
__BEGIN_DECLS
-int __setjmp14(jmp_buf);
-void __longjmp14(jmp_buf, int) __attribute__((__noreturn__));
+int __setjmp14(jmp_buf) __returns_twice;
+void __longjmp14(jmp_buf, int) __dead;
-int __sigsetjmp14(sigjmp_buf, int);
-void __siglongjmp14(sigjmp_buf, int) __attribute__((__noreturn__));
+int __sigsetjmp14(sigjmp_buf, int) __returns_twice;
+void __siglongjmp14(sigjmp_buf, int) __dead;
__END_DECLS
#endif /* !_COMPAT_SETJMP_H_ */
diff -r ea0555a6692c -r 1b24f180a428 sys/sys/cdefs.h
--- a/sys/sys/cdefs.h Sat Nov 05 09:22:43 2011 +0000
+++ b/sys/sys/cdefs.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.88 2011/10/09 20:30:19 chs Exp $ */
+/* $NetBSD: cdefs.h,v 1.89 2011/11/05 09:27:06 joerg Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -232,6 +232,12 @@
#define __noinline /* nothing */
#endif
+#if __GNUC_PREREQ__(4, 1)
+#define __returns_twice __attribute__((__returns_twice__))
+#else
+#define __returns_twice /* nothing */
+#endif
+
#if __GNUC_PREREQ__(4, 5)
#define __noclone __attribute__((__noclone__))
#else
diff -r ea0555a6692c -r 1b24f180a428 sys/sys/systm.h
--- a/sys/sys/systm.h Sat Nov 05 09:22:43 2011 +0000
+++ b/sys/sys/systm.h Sat Nov 05 09:27:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.250 2011/09/30 10:23:03 mrg Exp $ */
+/* $NetBSD: systm.h,v 1.251 2011/11/05 09:27:06 joerg Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -420,7 +420,7 @@
int uiomove_frombuf(void *, size_t, struct uio *);
#ifdef _KERNEL
-int setjmp(label_t *);
+int setjmp(label_t *) __returns_twice;
void longjmp(label_t *) __dead;
#endif
Home |
Main Index |
Thread Index |
Old Index