xref: /haiku/src/tools/fs_shell/posix_compatibility.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2  * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _FSSH_POSIX_COMPATIBILITY_H
6 #define _FSSH_POSIX_COMPATIBILITY_H
7 
8 #include <limits.h>
9 
10 // BeOS doesn't define [U]LLONG_{MIN,MAX}, but [U]LONGLONG_{MIN,MAX}.
11 // And under some stupid Linux platforms we don't get the macros when
12 // compiling in C++ mode.
13 #ifndef LLONG_MAX
14 #	ifdef LONGLONG_MAX
15 		// define to the BeOS macro
16 #		define LLONG_MAX	LONGLONG_MAX
17 #	else
18 		// minimum acceptable value as per standard
19 #		define LLONG_MAX	(9223372036854775807LL)
20 #	endif
21 #endif
22 
23 #endif	// _FSSH_POSIX_COMPATIBILITY_H
24