"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/bsd/defines.h" (11 Jul 2020, 1486 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "defines.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef __defines_h__
    2 #define __defines_h__
    3 
    4 #include <sys/param.h>
    5 
    6 /* The BSD variant. */
    7 #if defined __FreeBSD__
    8 #define XOSVIEW_FREEBSD
    9 #elif defined __NetBSD__
   10 #define XOSVIEW_NETBSD
   11 #elif defined __OpenBSD__
   12 #define XOSVIEW_OPENBSD
   13 #elif defined __DragonFly__
   14 #define XOSVIEW_DFBSD
   15 #endif
   16 
   17 #if !( defined(XOSVIEW_FREEBSD) || \
   18        defined(XOSVIEW_NETBSD)  || \
   19        defined(XOSVIEW_OPENBSD) || \
   20        defined(XOSVIEW_DFBSD) )
   21 #error "Unsupported BSD variant."
   22 #endif
   23 
   24 /* UVM appeared on NetBSD 1.4 and OpenBSD 2.9. */
   25 #if ( defined(__NetBSD__) && __NetBSD_Version__ >= 104000000 ) || \
   26     ( defined(__OpenBSD__) && OpenBSD >= 200105 )
   27 #define HAVE_UVM 1
   28 #endif
   29 
   30 /* swapctl appeared on NetBSD 1.3. and OpenBSD 2.6 */
   31 #if ( defined(__NetBSD__) && __NetBSD_Version__ >= 103000000 ) || \
   32     ( defined(__OpenBSD__) && OpenBSD >= 199912 )
   33 #define HAVE_SWAPCTL 1
   34 #endif
   35 
   36 /* devstat appeared on FreeBSD 3.0. */
   37 #if ( defined(__FreeBSD__) && __FreeBSD_version >= 300005 ) || \
   38       defined(__DragonFly__)
   39 #define HAVE_DEVSTAT 1
   40 #endif
   41 
   42 /* kvm_getswapinfo appeared on FreeBSD 4.0 */
   43 #if ( defined(__FreeBSD__) && __FreeBSD_version >= 400000 ) || \
   44       defined(__DragonFly__)
   45 #define USE_KVM_GETSWAPINFO 1
   46 #endif
   47 
   48 /* Helper defines for battery meter. */
   49 #define XOSVIEW_BATT_NONE         0
   50 #define XOSVIEW_BATT_CHARGING     1
   51 #define XOSVIEW_BATT_DISCHARGING  2
   52 #define XOSVIEW_BATT_FULL         4
   53 #define XOSVIEW_BATT_LOW          8
   54 #define XOSVIEW_BATT_CRITICAL    16
   55 
   56 
   57 #endif