/* LSB interfaces availability configuration file Think of it as of autoconf's config.h. (Actually, if you're going to undermine the intent of this file, you actually may write an autoconf script for its contents.) The constants defined here are used to determine availiability in compile-time. Also the file contains functions to determine availability in runtime. They are named like function_available() and libsomething_available(). NOTE on automatic conditions. The macro __LSB_PROVIDES_xxx actually means ``xxx can be reached via normal #include and does not require a wrapper''. That actually means that xxx should either be provided by LSB or a non-LSB build should be running atm. That's why conditions have an additional maxterm ``!defined __LSB_VERSION__''. */ #ifndef _LSB_CONFIG_H #define _LSB_CONFIG_H /* Several interfaces are not included in LSB but should be included or reviewed in future. In order not to let you forget about them, I'm making the autobuild fail on newer standards, so that the autobuild maintainer would be notified about that. If you are not SURE, to what version the interface will be included, use __LSB_NEXT_STANDARD macro */ #define __LSB_NEXT_STANDARD 41 #ifdef __cplusplus extern "C" { #endif #include "lsb_helpers.h" // pthread_getattr_np (bug #2364) #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_pthread_getattr_np // The function to check interface availability in runtime #define pthread_getattr_np_available() 1 #else // Helper that introduces the availability-checking functions LSB_AVAIL_RUNTIME(pthread_getattr_np); #endif // dlvsym (bug #2673) #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_dlvsym #define dlvsym_available() 1 #else LSB_AVAIL_RUNTIME(dlvsym); #endif // sysinfo (bug #2163) #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_sysinfo #define sysinfo_available() 1 #else LSB_AVAIL_RUNTIME(sysinfo); #endif // mntent group -- interfaces for reading /etc/fstab // mntent_r #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_setmntent #define setmntent_available() 1 #define __LSB_PROVIDES_getmntent_r #define getmntent_r_available() 1 #define __LSB_PROVIDES_endmntent #define endmntent_available() 1 #define __LSB_PROVIDES_sysinfo #define sysinfo_available() 1 #else LSB_AVAIL_RUNTIME(setmntent); LSB_AVAIL_RUNTIME(getmntent_r); LSB_AVAIL_RUNTIME(endmntent); #endif // snd_rawmidi_info #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_snd_rawmidi_info #define snd_rawmidi_info_available() 1 #else LSB_AVAIL_RUNTIME(snd_rawmidi_info); #endif // snd_rawmidi_info_get_card #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_snd_rawmidi_info_get_card #define snd_rawmidi_info_get_card_available() 1 #else LSB_AVAIL_RUNTIME(snd_rawmidi_info_get_card); #endif // Different flags // enum snd_seq_event_type // I think it's a mistake that it's not in LSB. #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_snd_seq_event_type #define snd_seq_event_type_available() 1 #else #define snd_seq_event_type_available() 0 #endif // SO_PEERCRED #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_SO_PEERCRED #define SO_PEERCRED_available() 1 #else #define SO_PEERCRED_available() 0 #endif // IFHWADDRLEN #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_IFHWADDRLEN #define IFHWADDRLEN_available() 1 #else #define IFHWADDRLEN_available() 0 #endif // dlopen's RTLD_NOLOAD #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_RTLD_NOLOAD #define RTLD_NOLOAD_available() 1 #else #define RTLD_NOLOAD_available() 0 #endif //MAP_NORESERVE #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_MAP_NORESERVE #define MAP_NORESERVE_available() 1 #else #define MAP_NORESERVE_available() 0 #endif //FT_StreamRec. Small omission. #if (__LSB_VERSION__ >= 41) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_FT_StreamRec #define FT_StreamRec_available() 1 #else #define FT_StreamRec_available() 0 #endif // FT_GlyphSlot_Embolden #if (__LSB_VERSION__ >= __LSB_NEXT_STANDARD) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_FT_GlyphSlot_Embolden #define FT_GlyphSlot_Embolden_available() 1 #else LSB_AVAIL_RUNTIME(FT_GlyphSlot_Embolden); #endif // FT_GlyphSlot_Oblique #if (__LSB_VERSION__ >= __LSB_NEXT_STANDARD) || (!defined __LSB_VERSION__) #define __LSB_PROVIDES_FT_GlyphSlot_Oblique #define FT_GlyphSlot_Oblique_available() 1 #else LSB_AVAIL_RUNTIME(FT_GlyphSlot_Oblique); #endif // The support of the following functions is not planned // Therefore, we have to enwrap them in ifdef condition that triggers only // if we're doing an lsb build. #ifdef __LSB_VERSION__ // libthread_db #undef __LSB_PROVIDES_libthread_db LSB_AVAIL_RUNTIME(libthread_db); // ptrace (bug #1664) #undef __LSB_PROVIDES_ptrace LSB_AVAIL_RUNTIME(ptrace); // syscalls #undef __LSB_PROVIDES_syscall_gettid #define syscall_gettid_available() 0 // For more fine grained syscall availability and calling interfaces see // include/syscall.h #undef __LSB_PROVIDES_syscall_fork #undef __LSB_PROVIDES_syscall_exevce #undef __LSB_PROVIDES_NAME_MAX // This flag is used in such a way, that it actually does no sense on modern // kernels and workarounds RFC incompliance of older ones. So, it does no // harm to leave this as never-in-lsb and define the flag. // For more info see http://marc.info/?l=linux-netdev&m=120851487828101&w=2 #undef __LSB_PROVIDES_IPV6_CHECKSUM // mincore is too low-level and Java specs allow it to be absent #undef __LSB_PROVIDES_mincore // The value is used in the implementation of library inlined into openjdk #undef __LSB_PROVIDES_MSG_FIN #endif // __LSB_VERSION__ #ifdef __cplusplus } #endif #endif // include sentry