CMakeLists.txt: check against c not c++ (CheckCXX -> CheckC etc)

BMP/EMF/PCX/TIF: use more portable packed attribute instead of
  pragma if not MSVC
CHANNEL: pass ptr not struct to `channel_copy_precalc()`
This commit is contained in:
gitlost 2024-05-27 20:55:04 +01:00
parent 3960dfdbfc
commit 0a00d04ccc
8 changed files with 94 additions and 71 deletions

View file

@ -113,6 +113,13 @@ INTERNAL FILE *out_win_fopen(const char *filename, const char *mode);
bp[3] = (unsigned char) ((*p_u32 >> 24) & 0xFF); \
} while (0)
/* For more portability, use `#pragma pack()` pair for MSCV, per-type packed attribute otherwise */
#ifdef _MSC_VER
# define OUT_PACK
#else
# define OUT_PACK __attribute__((__packed__))
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */