bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH master] Prepare header files for ARMv4.


From: Danny Milosavljevic
Subject: [PATCH master] Prepare header files for ARMv4.
Date: Mon, 1 Jun 2020 23:48:12 +0200

* include/fcntl.h (O_DIRECTORY): Add ARM case.
* include/signal.h (struct sigaction): Add uapi case.
* include/stdint.h: Add ARM case.
* include/sys/stat.h (struct stat): Add ARM case.
---
 include/fcntl.h    |  7 +++++++
 include/signal.h   | 14 +++++++++++++-
 include/stdint.h   |  3 ++-
 include/sys/stat.h |  2 +-
 4 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/include/fcntl.h b/include/fcntl.h
index bfb870df..2a8ece80 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -38,7 +38,14 @@
 #define O_EXCL         0x80
 #define O_TRUNC       0x200
 #define O_APPEND      0x400
+
+#ifdef __arm__
+#define O_DIRECTORY 0x4000
+/*#define O_DIRECT 0x10000*/
+#else
 #define O_DIRECTORY 0x10000
+#endif
+
 #elif __GNU__
 #define        O_RDONLY          1
 #define        O_WRONLY          2
diff --git a/include/signal.h b/include/signal.h
index 877b2d55..d8152f34 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -126,6 +126,7 @@ typedef long sighandler_t;
 typedef void (*sighandler_t) (int);
 #endif
 
+#if __i386__ || __x86_64__
 struct sigaction
 {
   union
@@ -144,7 +145,18 @@ struct sigaction
   //unsigned long sa_flags; // x86?
   void (*sa_restorer) (void);
 };
-
+#else /* uapi */
+struct sigaction {
+  union
+  {
+    sighandler_t sa_handler;
+    void (*sa_sigaction) (int signum, siginfo_t *, void *);
+  };
+  unsigned long sa_flags;
+  void (*sa_restorer) (void);
+  sigset_t sa_mask;
+};
+#endif
 
 #define SIG_DFL ((sighandler_t)0)
 #define SIG_IGN ((sighandler_t)1)
diff --git a/include/stdint.h b/include/stdint.h
index 8b8994e3..80f55e24 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -85,7 +85,8 @@ typedef unsigned uintmax_t;
 
 #define INT_MIN -2147483648
 #define INT_MAX 2147483647
-#if __i386__
+
+#if __i386__ || __arm__
 #define LONG_MIN INT_MIN
 #define LONG_MAX INT_MAX
 #define UINT_MAX UINT32_MAX
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 891f31c8..adc75f21 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -35,7 +35,7 @@ typedef int mode_t;
 #endif
 
 // *INDENT-OFF*
-#if __i386__
+#if __i386__ || __arm__
 struct stat
 {
   unsigned long  st_dev;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]