Edit

kc3-lang/libxkbcommon/src/utils-paths.h

Branch :

  • Browse

    Commit

  • Author : Ran Benita
    Date : 2025-01-25 03:18:01
    Hash : 113ac304
    Message : meson: link tests and benches against shared library, not static library This makes the tests, and especially benches, more realistic, since xkbcommon is almost always used as a shared library. Also significantly reduces the build time with LTO enabled (for me, from 90s to 30s). Signed-off-by: Ran Benita <ran@unusedvar.com>

  • src/utils-paths.h
  • /*
     * Copyright © 2024 Pierre Le Marre
     * SPDX-License-Identifier: MIT
     */
    #pragma once
    
    #include <stdbool.h>
    
    #ifdef _WIN32
    #define PATH_SEPARATOR '\\'
    #define ALT_PATH_SEPARATOR '/'
    #define is_path_separator(s) \
        ((s) == PATH_SEPARATOR || (s) == ALT_PATH_SEPARATOR)
    #else
    #define PATH_SEPARATOR '/'
    #define is_path_separator(s) ((s) == PATH_SEPARATOR)
    #endif
    
    XKB_EXPORT_PRIVATE bool
    is_absolute(const char *path);