This is the mail archive of the
newlib-cvs@sourceware.org
mailing list for the newlib project.
[newlib-cygwin] Guard ssize_t definition by _SSIZE_T_DECLARED
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: newlib-cvs at sourceware dot org
- Date: 18 Mar 2016 11:31:45 -0000
- Subject: [newlib-cygwin] Guard ssize_t definition by _SSIZE_T_DECLARED
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a10dacbdac3ed9ad8e12e29473236cbbe0ff4e10
commit a10dacbdac3ed9ad8e12e29473236cbbe0ff4e10
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri Mar 18 11:49:24 2016 +0100
Guard ssize_t definition by _SSIZE_T_DECLARED
This guard is used by FreeBSD <sys/socket.h> for example. The FreeBSD
network stack is used in RTEMS.
* newlib/libc/include/sys/types.h (ssize_t): Guard by
_SSIZE_T_DECLARED.
Diff:
---
newlib/libc/include/sys/types.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c09866b..52530c5 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -192,7 +192,11 @@ typedef _mode_t mode_t;
#ifndef __CYGWIN__
typedef long key_t;
#endif
+
+#ifndef _SSIZE_T_DECLARED
typedef _ssize_t ssize_t;
+#define _SSIZE_T_DECLARED
+#endif
#if !defined(__CYGWIN__) && !defined(__rtems__)
#ifdef __MS_types__