aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/tests
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2020-01-14 10:46:42 +0000
committerOlivier Hainque <hainque@adacore.com>2022-01-16 09:22:14 +0000
commit9d7e19255c06e05ad791e9bf5aefc4783a12c4f9 (patch)
tree91fcd21a49ed8f11db1fae5e2502a95df489ed83 /fixincludes/tests
parent943fad67028c7164ddf9f818877394f74c06f254 (diff)
downloadgcc-9d7e19255c06e05ad791e9bf5aefc4783a12c4f9.zip
gcc-9d7e19255c06e05ad791e9bf5aefc4783a12c4f9.tar.gz
gcc-9d7e19255c06e05ad791e9bf5aefc4783a12c4f9.tar.bz2
Add VxWorks fixincludes hack, open posix API for C++
When system headers expose a strict "open" prototype with 3 args, arrange to expose a C++ overload with only two. 2021-01-10 Olivier Hainque <hainque@adacore.com> * inclhack.def (vxworks_math_h_fp_c99): New hack. * tests/base/fcntl.h: Update. * fixincl.x: Regenerate.
Diffstat (limited to 'fixincludes/tests')
-rw-r--r--fixincludes/tests/base/fcntl.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/fixincludes/tests/base/fcntl.h b/fixincludes/tests/base/fcntl.h
index 3a40c01..fe0e56a 100644
--- a/fixincludes/tests/base/fcntl.h
+++ b/fixincludes/tests/base/fcntl.h
@@ -18,6 +18,39 @@ extern "C" {
#if defined( AAB_AIX_FCNTL_CHECK )
#endif /* AAB_AIX_FCNTL_CHECK */
+
+
+#if defined( VXWORKS_POSIX_OPEN_CHECK )
+extern int open (const char *, int, int);
+
+#if defined(__cplusplus)
+extern "C++" {
+ inline int open (const char *, int) __attribute__((__always_inline__));
+
+ inline int
+ open (const char *name, int flags)
+ {
+ return open (name, flags, 0);
+ }
+}
+#endif
+
+extern int open (const char *name, int flags, int mode );
+
+#if defined(__cplusplus)
+extern "C++" {
+ inline int open (const char *, int) __attribute__((__always_inline__));
+
+ inline int
+ open (const char *name, int flags)
+ {
+ return open (name, flags, 0);
+ }
+}
+#endif
+
+
+#endif /* VXWORKS_POSIX_OPEN_CHECK */
#ifdef __cplusplus
}
#endif