aboutsummaryrefslogtreecommitdiff
path: root/system/include/compat/sys
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/compat/sys')
-rw-r--r--system/include/compat/sys/stat.h20
-rw-r--r--system/include/compat/sys/timeb.h39
2 files changed, 59 insertions, 0 deletions
diff --git a/system/include/compat/sys/stat.h b/system/include/compat/sys/stat.h
new file mode 100644
index 00000000..731502ea
--- /dev/null
+++ b/system/include/compat/sys/stat.h
@@ -0,0 +1,20 @@
+#ifndef _COMPAT_STAT_H
+#define _COMPAT_STAT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include_next <sys/stat.h>
+
+#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
+#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
+#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
+#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
+#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/system/include/compat/sys/timeb.h b/system/include/compat/sys/timeb.h
new file mode 100644
index 00000000..0a2c3de8
--- /dev/null
+++ b/system/include/compat/sys/timeb.h
@@ -0,0 +1,39 @@
+/* timeb.h -- An implementation of the standard Unix <sys/timeb.h> file.
+ Written by Ian Lance Taylor <ian@cygnus.com>
+ Public domain; no rights reserved.
+
+ <sys/timeb.h> declares the structure used by the ftime function, as
+ well as the ftime function itself. Newlib does not provide an
+ implementation of ftime. */
+
+#ifndef _SYS_TIMEB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _SYS_TIMEB_H
+
+#include <_ansi.h>
+#include <machine/types.h>
+
+#ifndef __time_t_defined
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#endif
+
+struct timeb
+{
+ time_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+};
+
+extern int ftime _PARAMS ((struct timeb *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ! defined (_SYS_TIMEB_H) */