Added Estonian transtation
[midnight-commander.git] / lib / unixcompat.h
blob9ad6e318ee404bc78fdab3d8792ef1e6aec412a7
2 /** \file unixcompat.h
3 * \brief Header: collects differences between the various Unix
5 * This header file collects differences between the various Unix
6 * variants that are supported by the Midnight Commander and provides
7 * replacement routines if they are not natively available.
8 * The major/minor macros are not specified in SUSv3, so we can only hope
9 * they are provided by the operating system or emulate it.
12 #ifndef MC_UNIXCOMPAT_H
13 #define MC_UNIXCOMPAT_H
15 #include <sys/types.h> /* BSD */
16 #ifdef HAVE_SYS_MKDEV_H
17 # include <sys/mkdev.h> /* Solaris 9 */
18 #endif
19 #if defined(_AIX) && defined(HAVE_SYS_SYSMACROS_H)
20 # include <sys/sysmacros.h> /* AIX */
21 #endif
23 #if defined(_AIX)
24 # include <time.h> /* AIX for tm */
25 #endif
27 #ifndef major
28 # warning major() is undefined. Device numbers will not be shown correctly.
29 # define major(devnum) (((devnum) >> 8) & 0xff)
30 #endif
31 #ifndef minor
32 # warning minor() is undefined. Device numbers will not be shown correctly.
33 # define minor(devnum) (((devnum) & 0xff))
34 #endif
35 #ifndef makedev
36 # warning makedev() is undefined. Device numbers will not be shown correctly.
37 # define makedev(major,minor) ((((major) & 0xff) << 8) | ((minor) & 0xff))
38 #endif
40 #endif