Check if macros are defined before using

Assume macros with the same prefix would be defined together.
This commit is contained in:
Nobuyoshi Nakada 2023-07-24 23:59:50 +09:00
Родитель 14d1540768
Коммит 1faeb44dfc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -56,13 +56,13 @@ enum rb_io_buffer_endian {
RB_IO_BUFFER_LITTLE_ENDIAN = 4,
RB_IO_BUFFER_BIG_ENDIAN = 8,
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_LITTLE_ENDIAN,
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_BIG_ENDIAN,
#elif REG_DWORD == REG_DWORD_LITTLE_ENDIAN
#elif defined(REG_DWORD) && REG_DWORD == REG_DWORD_LITTLE_ENDIAN
RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_LITTLE_ENDIAN,
#elif REG_DWORD == REG_DWORD_BIG_ENDIAN
#elif defined(REG_DWORD) && REG_DWORD == REG_DWORD_BIG_ENDIAN
RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_BIG_ENDIAN,
#endif