Commit c61de41a authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Philip Chimento

gjs/debugger.cpp: Fix build on Windows

Don't include unistd.h on Windows, instead include io.h for isatty() and
define STDIN_FILENO as necessary.
parent 5d222f48
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Authored By: Philip Chimento <philip.chimento@gmail.com> * Authored By: Philip Chimento <philip.chimento@gmail.com>
*/ */
#include <unistd.h>
#include <gio/gio.h> #include <gio/gio.h>
#include "gjs/context-private.h" #include "gjs/context-private.h"
...@@ -36,6 +34,15 @@ ...@@ -36,6 +34,15 @@
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined(XP_WIN)
# include <io.h>
# ifndef STDIN_FILENO
# define STDIN_FILENO 0
# endif
#endif
GJS_JSAPI_RETURN_CONVENTION GJS_JSAPI_RETURN_CONVENTION
static bool quit(JSContext* cx, unsigned argc, JS::Value* vp) { static bool quit(JSContext* cx, unsigned argc, JS::Value* vp) {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment