From 5ad26d68a3d2d99c2df367e77fd62c9616f507a8 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Wed, 26 Jun 2013 20:43:45 +0200 Subject: [PATCH] Add OFF_MIN and OFF_MAX. --- sortix/include/sortix/bits.h | 6 ++++++ sortix/include/sortix/x64/bits.h | 2 ++ sortix/include/sortix/x86/bits.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/sortix/include/sortix/bits.h b/sortix/include/sortix/bits.h index d54178d7..ae970514 100644 --- a/sortix/include/sortix/bits.h +++ b/sortix/include/sortix/bits.h @@ -38,3 +38,9 @@ #warning Unsupported platform #endif +#if (defined(SORTIX_KERNEL) || defined(LIBC_LIBRARY)) && !defined(OFF_MIN) +#define OFF_MIN __OFF_MIN +#endif +#if (defined(SORTIX_KERNEL) || defined(LIBC_LIBRARY)) && !defined(OFF_MAX) +#define OFF_MAX __OFF_MAX +#endif diff --git a/sortix/include/sortix/x64/bits.h b/sortix/include/sortix/x64/bits.h index 1002e04d..dcdf865f 100644 --- a/sortix/include/sortix/x64/bits.h +++ b/sortix/include/sortix/x64/bits.h @@ -138,6 +138,8 @@ typedef int __uid_t; typedef int __locale_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __mode_t; typedef __intmax_t __off_t; +#define __OFF_MIN __INTMAX_MIN +#define __OFF_MAX __INTMAX_MAX typedef unsigned int __wctrans_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __wctype_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __useconds_t; diff --git a/sortix/include/sortix/x86/bits.h b/sortix/include/sortix/x86/bits.h index 94dfd027..921b813e 100644 --- a/sortix/include/sortix/x86/bits.h +++ b/sortix/include/sortix/x86/bits.h @@ -138,6 +138,8 @@ typedef int __uid_t; typedef int __locale_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __mode_t; typedef __intmax_t __off_t; +#define __OFF_MIN __INTMAX_MIN +#define __OFF_MAX __INTMAX_MAX typedef unsigned int __wctrans_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __wctype_t; /* TODO: figure out what this does and typedef it properly. This is just a temporary assignment. */ typedef unsigned int __useconds_t;