xref: /haiku/headers/private/userlandfs/shared/Compatibility.h (revision 93a78ecaa45114d68952d08c4778f073515102f2)
1 // Compatibility.h
2 //
3 // Copyright (c) 2004, Ingo Weinhold (bonefish@cs.tu-berlin.de)
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a
6 // copy of this software and associated documentation files (the "Software"),
7 // to deal in the Software without restriction, including without limitation
8 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 // and/or sell copies of the Software, and to permit persons to whom the
10 // Software is furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 // DEALINGS IN THE SOFTWARE.
22 //
23 // Except as contained in this notice, the name of a copyright holder shall
24 // not be used in advertising or otherwise to promote the sale, use or other
25 // dealings in this Software without prior written authorization of the
26 // copyright holder.
27 
28 #ifndef USERLAND_FS_COMPATIBILITY_H
29 #define USERLAND_FS_COMPATIBILITY_H
30 
31 #include <BeBuild.h>
32 
33 #if B_BEOS_VERSION <= B_BEOS_VERSION_5
34 //#	define B_BAD_DATA -2147483632L
35 #else
36 #	ifndef closesocket
37 #		define closesocket(fd)	close(fd)
38 #	endif
39 #endif
40 
41 // a Haiku definition
42 #ifndef B_BUFFER_OVERFLOW
43 #	define B_BUFFER_OVERFLOW	EOVERFLOW
44 #endif
45 
46 // make Zeta R5 source compatible without needing to link against libzeta.so
47 #ifdef find_directory
48 #	undef find_directory
49 #endif
50 
51 #endif	// USERLAND_FS_COMPATIBILITY_H
52