Prepare header files for ARMv4.

* 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.
This commit is contained in:
Danny Milosavljevic 2020-06-01 23:48:12 +02:00
parent 6183816f83
commit 2b69460894
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5
4 changed files with 23 additions and 3 deletions

View file

@ -38,7 +38,14 @@
#define O_EXCL 0x80 #define O_EXCL 0x80
#define O_TRUNC 0x200 #define O_TRUNC 0x200
#define O_APPEND 0x400 #define O_APPEND 0x400
#ifdef __arm__
#define O_DIRECTORY 0x4000
/*#define O_DIRECT 0x10000*/
#else
#define O_DIRECTORY 0x10000 #define O_DIRECTORY 0x10000
#endif
#elif __GNU__ #elif __GNU__
#define O_RDONLY 1 #define O_RDONLY 1
#define O_WRONLY 2 #define O_WRONLY 2

View file

@ -126,6 +126,7 @@ typedef long sighandler_t;
typedef void (*sighandler_t) (int); typedef void (*sighandler_t) (int);
#endif #endif
#if __i386__ || __x86_64__
struct sigaction struct sigaction
{ {
union union
@ -144,7 +145,19 @@ struct sigaction
//unsigned long sa_flags; // x86? //unsigned long sa_flags; // x86?
void (*sa_restorer) (void); 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_DFL ((sighandler_t)0)
#define SIG_IGN ((sighandler_t)1) #define SIG_IGN ((sighandler_t)1)

View file

@ -85,7 +85,7 @@ typedef unsigned uintmax_t;
#define INT_MIN -2147483648 #define INT_MIN -2147483648
#define INT_MAX 2147483647 #define INT_MAX 2147483647
#if __i386__ #if __i386__ || __arm__
#define LONG_MIN INT_MIN #define LONG_MIN INT_MIN
#define LONG_MAX INT_MAX #define LONG_MAX INT_MAX
#define UINT_MAX UINT32_MAX #define UINT_MAX UINT32_MAX

View file

@ -35,7 +35,7 @@ typedef int mode_t;
#endif #endif
// *INDENT-OFF* // *INDENT-OFF*
#if __i386__ #if __i386__ || __arm__
struct stat struct stat
{ {
unsigned long st_dev; unsigned long st_dev;