From 818786a83af8b2d275629472aa4497f77678fc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 3 Jul 2010 16:39:29 +0000 Subject: [PATCH] Define ssize_t in Haiku headers when building with GCC4 (see also #5719). This could imply a conflict with old gcc4 Haiku builds. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37380 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/size_t.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/headers/posix/size_t.h b/headers/posix/size_t.h index 0662047f6a..c8f2e7e743 100644 --- a/headers/posix/size_t.h +++ b/headers/posix/size_t.h @@ -1,5 +1,5 @@ /* - * Copyright 2008, Haiku Inc. All Rights Reserved. + * Copyright 2008-2010, Haiku Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _SIZE_T_H_ @@ -7,7 +7,12 @@ #include -/* TODO: ATM gcc's stddef.h defines ssize_t for BeOS.h. We should fix this. - * typedef long signed int ssize_t; */ +/* ATM we don't define ssize_t for GCC2 */ +#if __GNUC__ > 2 +#ifndef __ssize_t__ +#define __ssize_t__ +typedef long signed int ssize_t; +#endif /* __ssize_t__ */ +#endif /* __GNUC__ > 2 */ #endif /* _SIZE_T_H_ */