nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f474b64
)
core: intro `is_windows`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 14 Aug 2016 14:10:56 +0000
(10:10 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 14 Aug 2016 19:01:57 +0000
(15:01 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/core/kernel.nit
patch
|
blob
|
history
diff --git
a/lib/core/kernel.nit
b/lib/core/kernel.nit
index
fe45072
..
18dd7ac
100644
(file)
--- a/
lib/core/kernel.nit
+++ b/
lib/core/kernel.nit
@@
-1073,3
+1073,12
@@
interface Task
# Main method of this task
fun main do end
end
+
+# Is this program currently running in a Windows OS?
+fun is_windows: Bool `{
+#ifdef _WIN32
+ return 1;
+#else
+ return 0;
+#endif
+`}