about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c3
-rw-r--r--libio/libioP.h8
2 files changed, 9 insertions, 2 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index 001794d05a..22feb74fdd 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -37,6 +37,9 @@
 #ifndef errno
 extern int errno;
 #endif
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
 
 
 #ifdef _LIBC
diff --git a/libio/libioP.h b/libio/libioP.h
index 1880e0bbde..66acb93bf4 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -28,7 +28,9 @@
 
 #include "iolibio.h"
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #define _IO_seek_set 0
 #define _IO_seek_cur 1
@@ -477,7 +479,9 @@ extern int _IO_vscanf __P ((const char *, _IO_va_list));
 # define _IO_pos_0 ((_IO_fpos_t) 0)
 #endif
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #ifdef _IO_MTSAFE_IO
 /* check following! */