From 633a69944700899f9e0ea541a165942cb8f2f58f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 7 May 2007 13:43:55 +0000 Subject: [PATCH] Since I haven't got enough information to solve the missing LLONG_MAX issue on some Linux distros by now, here's a work-around. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21056 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/fs_shell/posix_compatibility.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/tools/fs_shell/posix_compatibility.h b/src/tools/fs_shell/posix_compatibility.h index d5693f0b60..07677ba88c 100644 --- a/src/tools/fs_shell/posix_compatibility.h +++ b/src/tools/fs_shell/posix_compatibility.h @@ -5,13 +5,19 @@ #ifndef _FSSH_POSIX_COMPATIBILITY_H #define _FSSH_POSIX_COMPATIBILITY_H -// BeOS doesn't define [U]LLONG_{MIN,MAX}, but [U]LONGLONG_{MIN,MAX} #include -#ifndef LLONG_MIN -# define LLONG_MIN LONGLONG_MIN -# define LLONG_MAX LONGLONG_MAX -# define ULLONG_MAX ULONGLONG_MAX + +// BeOS doesn't define [U]LLONG_{MIN,MAX}, but [U]LONGLONG_{MIN,MAX}. +// And under some stupid Linux platforms we don't get the macros when +// compiling in C++ mode. +#ifndef LLONG_MAX +# ifdef LONGLONG_MAX + // define to the BeOS macro +# define LLONG_MAX LONGLONG_MAX +# else + // minimum acceptable value as per standard +# define LLONG_MAX (9223372036854775807LL) +# endif #endif #endif // _FSSH_POSIX_COMPATIBILITY_H -