libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

os_macros.h (864B)


      1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style
      4 // license that can be found in the LICENSE file.
      5 
      6 #ifndef LIB_JXL_BASE_OS_MACROS_H_
      7 #define LIB_JXL_BASE_OS_MACROS_H_
      8 
      9 // Defines the JXL_OS_* macros.
     10 
     11 #if defined(_WIN32) || defined(_WIN64)
     12 #define JXL_OS_WIN 1
     13 #else
     14 #define JXL_OS_WIN 0
     15 #endif
     16 
     17 #ifdef __linux__
     18 #define JXL_OS_LINUX 1
     19 #else
     20 #define JXL_OS_LINUX 0
     21 #endif
     22 
     23 #ifdef __APPLE__
     24 #define JXL_OS_MAC 1
     25 #else
     26 #define JXL_OS_MAC 0
     27 #endif
     28 
     29 #define JXL_OS_IOS 0
     30 #ifdef __APPLE__
     31 #include <TargetConditionals.h>
     32 #if TARGET_OS_IPHONE
     33 #undef JXL_OS_IOS
     34 #define JXL_OS_IOS 1
     35 #endif
     36 #endif
     37 
     38 #ifdef __FreeBSD__
     39 #define JXL_OS_FREEBSD 1
     40 #else
     41 #define JXL_OS_FREEBSD 0
     42 #endif
     43 
     44 #ifdef __HAIKU__
     45 #define JXL_OS_HAIKU 1
     46 #else
     47 #define JXL_OS_HAIKU 0
     48 #endif
     49 
     50 #endif  // LIB_JXL_BASE_OS_MACROS_H_