• D
    util: introduce compile time API version checking · f08d5dad
    Daniel P. Berrangé 提交于
    GLib header files annotate every API with a version number.
    
    It is possible to define some constants before including
    glib.h which will result in useful compile time warnings.
    
    Setting GLIB_VERSION_MIN_REQUIRED will result in a warning
    if libvirt uses an API that was deprecated in the declared
    version, or before. Such API usage should be rewritten to
    use the documented new replacement API.
    
    Setting GLIB_VERSION_MAX_ALLOWED will result in a warning
    if libvirt uses an API that was not introduced until a
    version of GLib that's newer than our minimum declared
    version. This avoids accidentally using functionality
    that is not available on some supported platforms.
    Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
    Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
    Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
    f08d5dad
config-post.h 2.3 KB