aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/errno.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-08-18 16:16:18 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-08-18 16:16:18 +0000
commit69cb702bf19d146e06c5876456c1c7839560da9c (patch)
treea0697c4e39131ed08630fe5d3846c85774136839 /sys/sys/errno.h
parent979ef59bf89400cf518b0b3a13cf2942018de470 (diff)
downloadsrc-69cb702bf19d146e06c5876456c1c7839560da9c.tar.gz
src-69cb702bf19d146e06c5876456c1c7839560da9c.zip
make the declaration of the __error() function C++ safe. Otherwise,
the linker comes up with undefined variables because of the #define errno when using _THREAD_SAFE.
Notes
Notes: svn path=/head/; revision=17649
Diffstat (limited to 'sys/sys/errno.h')
-rw-r--r--sys/sys/errno.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index 3dddd456834b..12fb7d498bd6 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)errno.h 8.5 (Berkeley) 1/21/94
- * $Id: errno.h,v 1.3 1994/08/21 04:41:42 paul Exp $
+ * $Id: errno.h,v 1.4 1996/01/22 00:02:33 julian Exp $
*/
#ifndef _SYS_ERRNO_H_
@@ -44,7 +44,10 @@
#ifndef KERNEL
#ifdef _THREAD_SAFE
-extern int * __error();
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+int * __error __P((void));
+__END_DECLS
#define errno (* __error())
#else
extern int errno; /* global error number */