This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 14/22] Provide rlim_t via <sys/types.h>


Provide rlim_t via <sys/types.h> if __BSD_VISIBLE for BSD
compatibility.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/sys/_types.h | 3 +++
 newlib/libc/include/sys/types.h  | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index edb7fb1..5b408ea 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -202,6 +202,9 @@ typedef	int		__accmode_t;	/* access permissions */
 typedef	__uint32_t	__fixpt_t;	/* fixed point number */
 typedef	__pid_t		__lwpid_t;	/* Thread ID (a.k.a. LWP) */
 typedef	unsigned short	__nlink_t;
+typedef	__int64_t	__rlim_t;	/* resource limit - intentionally */
+					/* signed, because of legacy code */
+					/* that uses -1 for RLIM_INFINITY */
 typedef	long		__suseconds_t;	/* microseconds (signed) */
 typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */
 
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index a328c73..8511d49 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -101,6 +101,11 @@ typedef	__uint16_t	in_port_t;
 typedef	__lwpid_t	lwpid_t;	/* Thread ID (a.k.a. LWP) */
 #define	_LWPID_T_DECLARED
 #endif
+
+#ifndef _RLIM_T_DECLARED
+typedef	__rlim_t	rlim_t;		/* resource limit */
+#define	_RLIM_T_DECLARED
+#endif
 #endif /* __BSD_VISIBLE */
 
 #if __MISC_VISIBLE
-- 
1.8.4.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]