Skip to content

Commit aeba162

Browse files
committed
fixed __has_include in CI/autotest
1 parent 1131829 commit aeba162

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/libcxx/include/__mbstate_t.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
# define __NEED_mbstate_t
4040
# include <bits/alltypes.h>
4141
# undef __NEED_mbstate_t
42-
#elif __has_include(<bits/types/mbstate_t.h>)
42+
#elif !defined(_EZ80) && __has_include(<bits/types/mbstate_t.h>)
4343
# include <bits/types/mbstate_t.h> // works on most Unixes
44-
#elif __has_include(<sys/_types/_mbstate_t.h>)
44+
#elif !defined(_EZ80) && __has_include(<sys/_types/_mbstate_t.h>)
4545
# include <sys/_types/_mbstate_t.h> // works on Darwin
4646
#elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next(<wchar.h>)
4747
# include_next <wchar.h> // fall back to the C standard provider of mbstate_t

src/libcxx/include/fstream

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public:
234234
# if _LIBCPP_STD_VER >= 26
235235
# if defined(_LIBCPP_WIN32API)
236236
using native_handle_type = void*; // HANDLE
237-
# elif __has_include(<unistd.h>)
237+
# elif !defined(_EZ80) && __has_include(<unistd.h>)
238238
using native_handle_type = int; // POSIX file descriptor
239239
# else
240240
# error "Provide a native file handle!"
@@ -271,7 +271,7 @@ public:
271271
_LIBCPP_ASSERT_UNCATEGORIZED(this->is_open(), "File must be opened");
272272
# if defined(_LIBCPP_WIN32API)
273273
return std::__filebuf_windows_native_handle(__file_);
274-
# elif __has_include(<unistd.h>)
274+
# elif !defined(_EZ80) && __has_include(<unistd.h>)
275275
return fileno(__file_);
276276
# else
277277
# error "Provide a way to determine the file native handle!"

src/libcxx/include/print

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
6666
// Note the function is only implemented on the Windows platform.
6767
_LIBCPP_EXPORTED_FROM_ABI void __write_to_windows_console(FILE* __stream, wstring_view __view);
6868
# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
69-
#elif __has_include(<unistd.h>)
69+
#elif !defined(_EZ80) && __has_include(<unistd.h>)
7070
_LIBCPP_EXPORTED_FROM_ABI bool __is_posix_terminal(FILE* __stream);
7171
#endif // _LIBCPP_WIN32API
7272

@@ -203,8 +203,8 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_terminal([[maybe_unused]] FILE* __stream)
203203
return false;
204204
# elif defined(_LIBCPP_WIN32API)
205205
return std::__is_windows_terminal(__stream);
206-
# elif __has_include(<unistd.h>)
207-
return std::__is_posix_terminal(__stream);
206+
# elif !defined(_EZ80) && __has_include(<unistd.h>)
207+
return isatty(fileno(__stream));
208208
# elif defined(_EZ80)
209209
return false;
210210
# else

src/libcxx/src/chrono.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#include "include/apple_availability.h"
2424
#include <time.h> // clock_gettime and CLOCK_{MONOTONIC,REALTIME,MONOTONIC_RAW}
2525

26-
#if __has_include(<unistd.h>)
26+
#if !defined(_EZ80) && __has_include(<unistd.h>)
2727
# include <unistd.h> // _POSIX_TIMERS
2828
#endif
2929

30-
#if __has_include(<sys/time.h>)
30+
#if !defined(_EZ80) && __has_include(<sys/time.h>)
3131
# include <sys/time.h> // for gettimeofday and timeval
3232
#endif
3333

@@ -50,7 +50,7 @@
5050
# include <zircon/syscalls.h>
5151
#endif
5252

53-
#if __has_include(<mach/mach_time.h>)
53+
#if !defined(_EZ80) && __has_include(<mach/mach_time.h>)
5454
# include <mach/mach_time.h>
5555
#endif
5656

src/libcxx/src/print.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# define NOMINMAX
2121
# include <io.h>
2222
# include <windows.h>
23-
#elif __has_include(<unistd.h>)
23+
#elif !defined(_EZ80) && __has_include(<unistd.h>)
2424
# include <unistd.h>
2525
#endif
2626

@@ -56,7 +56,7 @@ __write_to_windows_console([[maybe_unused]] FILE* __stream, [[maybe_unused]] wst
5656
}
5757
# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
5858

59-
#elif __has_include(<unistd.h>) // !_LIBCPP_WIN32API
59+
#elif !defined(_EZ80) && __has_include(<unistd.h>) // !_LIBCPP_WIN32API
6060

6161
_LIBCPP_EXPORTED_FROM_ABI bool __is_posix_terminal(FILE* __stream) { return isatty(fileno(__stream)); }
6262
#endif

0 commit comments

Comments
 (0)