mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 06:31:43 +02:00
Fixed S_ISDIR
This commit is contained in:
parent
1adaec0da0
commit
bd58998d04
@ -145,10 +145,10 @@ trexio_text_inquire (const char* file_name)
|
|||||||
if (file_exists) {
|
if (file_exists) {
|
||||||
|
|
||||||
bool is_a_directory = false;
|
bool is_a_directory = false;
|
||||||
#ifdef S_IFDIR
|
#if defined(S_IFDIR)
|
||||||
is_a_directory = st.st_mode & S_IFDIR;
|
is_a_directory = st.st_mode & S_IFDIR;
|
||||||
#elif S_ISDIR
|
#elif defined(S_ISDIR)
|
||||||
is_a_directory = S_ISDIR(s.st_mode);
|
is_a_directory = S_ISDIR(st.st_mode);
|
||||||
#else
|
#else
|
||||||
printf("Some important macros are missing for directory handling.\n");
|
printf("Some important macros are missing for directory handling.\n");
|
||||||
return TREXIO_FAILURE;
|
return TREXIO_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user