From 74604ab159782ff67e9d214e6300ab83db52363f Mon Sep 17 00:00:00 2001
From: Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
Date: Sat, 20 Aug 2011 01:38:16 +0000
Subject: [PATCH] 2011-08-19  Chris Sutcliffe  <ir0nh34d@users.sourceforge.net>

        * include/sys/types.h (ssize_t): Defined as int as opposed to long.

        Thanks to bvassche for the report.
---
 winsup/mingw/ChangeLog           | 6 ++++++
 winsup/mingw/include/sys/types.h | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index d0c6c6730..048846321 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-19  Chris Sutcliffe  <ir0nh34d@users.sourceforge.net>
+
+	* include/sys/types.h (ssize_t): Defined as int as opposed to long.
+
+	Thanks to bvassche for the report.
+
 2011-05-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
 	Correct checking for short option matches in getopt_long_only().
diff --git a/winsup/mingw/include/sys/types.h b/winsup/mingw/include/sys/types.h
index 82085e43b..26d91254e 100644
--- a/winsup/mingw/include/sys/types.h
+++ b/winsup/mingw/include/sys/types.h
@@ -112,7 +112,7 @@ typedef _sigset_t	sigset_t;
 
 #ifndef _SSIZE_T_
 #define _SSIZE_T_
-typedef long _ssize_t;
+typedef int _ssize_t;
 
 #ifndef	_NO_OLDNAMES
 typedef _ssize_t ssize_t;