Susumu Yata
null+****@clear*****
Fri Aug 18 17:45:57 JST 2017
Susumu Yata 2017-08-18 17:45:57 +0900 (Fri, 18 Aug 2017) New Revision: df1d4652ec4d2cd11853e44adbbd0b6fa3e01fae https://github.com/groonga/groonga/commit/df1d4652ec4d2cd11853e44adbbd0b6fa3e01fae Message: Add grn_isatty for portability Modified files: include/groonga/portability.h src/groonga.c Modified: include/groonga/portability.h (+6 -0) =================================================================== --- include/groonga/portability.h 2017-08-18 17:42:15 +0900 (4a888af88) +++ include/groonga/portability.h 2017-08-18 17:45:57 +0900 (1c7ee6c4e) @@ -187,3 +187,9 @@ #else /* WIN32 */ # define grn_fileno(stream) fileno((stream)) #endif /* WIN32 */ + +#ifdef WIN32 +# define grn_isatty(stream) _isatty((stream)) +#else /* WIN32 */ +# define grn_isatty(stream) isatty((stream)) +#endif /* WIN32 */ Modified: src/groonga.c (+1 -1) =================================================================== --- src/groonga.c 2017-08-18 17:42:15 +0900 (dcd00147b) +++ src/groonga.c 2017-08-18 17:45:57 +0900 (07125bd7b) @@ -3729,7 +3729,7 @@ main(int argc, char **argv) if (argc - i > 1) { batchmode = GRN_TRUE; } else { - batchmode = !isatty(0); + batchmode = !grn_isatty(0); } } } -------------- next part -------------- HTML����������������������������...Download