diff -uprN xnp2-0.86/x11/ext/c86ctl/c86ctlc86box.cpp xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlc86box.cpp
--- xnp2-0.86/x11/ext/c86ctl/c86ctlc86box.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlc86box.cpp	2018-07-05 15:57:44.429758000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "c86ctlc86box.h"
 #include <algorithm>
 
diff -uprN xnp2-0.86/x11/ext/c86ctl/c86ctlgimic.cpp xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlgimic.cpp
--- xnp2-0.86/x11/ext/c86ctl/c86ctlgimic.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlgimic.cpp	2018-07-05 15:58:22.367431000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "c86ctlgimic.h"
 #include <algorithm>
 
diff -uprN xnp2-0.86/x11/ext/c86ctl/c86ctlif.cpp xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlif.cpp
--- xnp2-0.86/x11/ext/c86ctl/c86ctlif.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlif.cpp	2018-07-05 15:59:07.034966000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "c86ctlif.h"
 #include "c86ctl.h"
 
diff -uprN xnp2-0.86/x11/ext/c86ctl/c86ctlrealchipbase.cpp xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlrealchipbase.cpp
--- xnp2-0.86/x11/ext/c86ctl/c86ctlrealchipbase.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/c86ctl/c86ctlrealchipbase.cpp	2018-07-05 15:59:39.443209000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "c86ctlrealchipbase.h"
 #include "c86ctlc86box.h"
 #include "c86ctlgimic.h"
diff -uprN xnp2-0.86/x11/ext/externalchipmanager.cpp xnp2-0.86-fixed/x11/ext/externalchipmanager.cpp
--- xnp2-0.86/x11/ext/externalchipmanager.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/externalchipmanager.cpp	2018-07-05 16:03:17.202714000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "externalchipmanager.h"
 #include <algorithm>
 #include "externalopl3.h"
diff -uprN xnp2-0.86/x11/ext/externalchipmanager.h xnp2-0.86-fixed/x11/ext/externalchipmanager.h
--- xnp2-0.86/x11/ext/externalchipmanager.h	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/externalchipmanager.h	2018-07-05 15:40:40.660349000 +0900
@@ -10,6 +10,7 @@
 #include "c86ctl/c86ctlif.h"
 #include "scci/scciif.h"
 
+
 /**
  * @brief ŠO•”ƒ`ƒbƒvŠÇ—�ƒNƒ‰ƒX
  */
diff -uprN xnp2-0.86/x11/ext/opl3.cpp xnp2-0.86-fixed/x11/ext/opl3.cpp
--- xnp2-0.86/x11/ext/opl3.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/opl3.cpp	2018-07-05 15:51:55.976042000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sound/opl3.h"
 #include "pccore.h"
 #include "iocore.h"
diff -uprN xnp2-0.86/x11/ext/opna.cpp xnp2-0.86-fixed/x11/ext/opna.cpp
--- xnp2-0.86/x11/ext/opna.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/opna.cpp	2018-07-05 15:55:11.242711000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sound/opna.h"
 #include "pccore.h"
 #include "iocore.h"
diff -uprN xnp2-0.86/x11/ext/scci/sccisoundchip.cpp xnp2-0.86-fixed/x11/ext/scci/sccisoundchip.cpp
--- xnp2-0.86/x11/ext/scci/sccisoundchip.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/scci/sccisoundchip.cpp	2018-07-05 16:00:31.730526000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sccisoundchip.h"
 #include "sccisoundinterface.h"
 
diff -uprN xnp2-0.86/x11/ext/scci/sccisoundinterface.cpp xnp2-0.86-fixed/x11/ext/scci/sccisoundinterface.cpp
--- xnp2-0.86/x11/ext/scci/sccisoundinterface.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/scci/sccisoundinterface.cpp	2018-07-05 16:01:03.898945000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sccisoundinterface.h"
 #include "sccisoundchip.h"
 #include "sccisoundinterfacemanager.h"
diff -uprN xnp2-0.86/x11/ext/scci/sccisoundinterfacemanager.cpp xnp2-0.86-fixed/x11/ext/scci/sccisoundinterfacemanager.cpp
--- xnp2-0.86/x11/ext/scci/sccisoundinterfacemanager.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/scci/sccisoundinterfacemanager.cpp	2018-07-05 16:02:01.906184000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sccisoundinterfacemanager.h"
 #include <algorithm>
 #include "sccisoundinterface.h"
diff -uprN xnp2-0.86/x11/ext/scci/sccispfmlight.cpp xnp2-0.86-fixed/x11/ext/scci/sccispfmlight.cpp
--- xnp2-0.86/x11/ext/scci/sccispfmlight.cpp	2016-03-09 02:25:50.000000000 +0900
+++ xnp2-0.86-fixed/x11/ext/scci/sccispfmlight.cpp	2018-07-05 16:02:35.624618000 +0900
@@ -4,6 +4,8 @@
  */
 
 #include "compiler.h"
+#undef min
+#undef max
 #include "sccispfmlight.h"
 #include "sccisoundchip.h"
 #include "misc/threadbase.h"
