/
redgpu
/
raygpu
Обзор
Документация
Войти
/
redgpu
/
raygpu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/windows_stuff.c
31 строка
693 B
manuel
Remove need for -I src/internal_include
08 окт 2025, 16:36
08 окт 2025, 16:36
1cb2ab9
Код
Авторство
О чём код?
// begin file src/windows_stuff.c #include <stdbool.h> #include <stdio.h> #if defined(_WIN32) || defined(_WIN64) #include <io.h> // For _isatty and _fileno #define PORTABLE_ISATTY _isatty #define PORTABLE_FILENO _fileno #else #include <unistd.h> // For isatty and fileno #define PORTABLE_ISATTY isatty #define PORTABLE_FILENO fileno #endif /** * @brief Portable function to check if a file descriptor refers to a terminal. * * @param fd The file descriptor to check. * @return int Returns 1 if `fd` is a terminal, 0 otherwise. */ bool IsATerminal(FILE *stream) { return PORTABLE_ISATTY(PORTABLE_FILENO(stream)); } // end file src/windows_stuff.c