Status: applied

Index: b/glide2x/cvg/glide/src/cpudetect.c
===================================================================
--- a/glide2x/cvg/glide/src/cpudetect.c
+++ b/glide2x/cvg/glide/src/cpudetect.c
@@ -20,6 +20,7 @@
 
 #include <sys/utsname.h>
 #include <stdio.h>
+#include <string.h>
 
 int _cpu_detect_asm() {
   struct utsname name;
Index: b/glide2x/cvg/glide/src/fxglide.h
===================================================================
--- a/glide2x/cvg/glide/src/fxglide.h
+++ b/glide2x/cvg/glide/src/fxglide.h
@@ -2225,7 +2225,7 @@ do { \
 #define REG_GROUP_SETF_CLAMP(__regBase, __regAddr, __val) \
 do { \
   const FxU32 fpClampVal = FP_FLOAT_CLAMP(__val); \
-  REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \  
+  REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
   SET(((FxU32*)(__regBase))[offsetof(SstRegs, __regAddr) >> 2], fpClampVal); \
   GR_INC_SIZE(sizeof(FxU32)); \
 } while(0)
Index: b/glide2x/h3/glide/src/fxglide.h
===================================================================
--- a/glide2x/h3/glide/src/fxglide.h
+++ b/glide2x/h3/glide/src/fxglide.h
@@ -2004,7 +2004,7 @@ _grFifoFWriteDebug((FxU32) a, (float) b,
                                      __stwbrx( *((FxU32*)&temp), (void*)&(d), 0 ); \
                                    }
 #      define SET_LINEAR(d, s)     SET((d), (s))
-#      define SET_LINEAR_16(d, s)  SET((d), ((((FxU32)(s)) >> 16UL) | \ 
+#      define SET_LINEAR_16(d, s)  SET((d), ((((FxU32)(s)) >> 16UL) | \
                                            (((FxU32)(s)) << 16UL)))
 #      define SET_LINEAR_8(d, s)   ((d) = (s))
 #    else /* !defined(__MWERKS__) && POWERPC */
@@ -3008,7 +3008,7 @@ do { \
 #define REG_GROUP_SETF_CLAMP(__regBase, __regAddr, __val) \
 do { \
   const FxU32 fpClampVal = FP_FLOAT_CLAMP(__val); \
-  REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \  
+  REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
   SET(((FxU32*)(__regBase))[offsetof(SstRegs, __regAddr) >> 2], fpClampVal); \
   GR_INC_SIZE(sizeof(FxU32)); \
 } while(0)
Index: b/glide2x/cvg/glide/oem/oeminit.h
===================================================================
--- a/glide2x/cvg/glide/oem/oeminit.h
+++ b/glide2x/cvg/glide/oem/oeminit.h
@@ -89,5 +89,5 @@ FX_EXPORT FxU32 FX_CSTYLE fxoemInitSetVi
 FX_EXPORT FxU32 FX_CSTYLE fxoemRestoreVideo(OemInitInfo *oem);
 FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode);
 
-#endif __OEMINIT_H__
+#endif /* __OEMINIT_H__ */
 
Index: b/glide2x/h3/minihwc/fxhwc.h
===================================================================
--- a/glide2x/h3/minihwc/fxhwc.h
+++ b/glide2x/h3/minihwc/fxhwc.h
@@ -41,8 +41,8 @@
 **  I/O Macros
 */
 #warning Here!
-#define HWC_IO_LOAD(regInfo, reg, val)
-GDBG_INFO(120, "%s:  Storing 0x%x to IO Register %s\n", 
+#define HWC_IO_LOAD(regInfo, reg, val) \
+GDBG_INFO(120, "%s:  Storing 0x%x to IO Register %s\n", \
 ((SstIORegs *) regInfo.ioMemBase)->
 
 
Index: b/glide2x/h3/glide/src/xdraw2.S
===================================================================
--- a/glide2x/h3/glide/src/xdraw2.S
+++ b/glide2x/h3/glide/src/xdraw2.S
@@ -125,10 +125,12 @@ PROC_TYPE(cull):
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
 #undef cull
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
+
+#undef LOCAL
 
 END_PROC_TYPE(cull):
 .size PROC_TYPE(cull),END_PROC_TYPE(cull)-PROC_TYPE(cull)
@@ -147,10 +149,12 @@ PROC_TYPE(cull_rgb):
 #define GLIDE_PACK_ALPHA 0
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
+
+#undef LOCAL
 
 END_PROC_TYPE(cull_rgb):
 .size PROC_TYPE(cull_rgb),END_PROC_TYPE(cull_rgb)-PROC_TYPE(cull_rgb)
@@ -168,10 +172,10 @@ PROC_TYPE(cull_argb):
 #define GLIDE_PACK_ALPHA 1
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
 
 END_PROC_TYPE(cull_argb):
 .size PROC_TYPE(cull_argb),END_PROC_TYPE(cull_argb)-PROC_TYPE(cull_argb)
@@ -190,10 +194,12 @@ PROC_TYPE(Default):
 #define GLIDE_PACK_ALPHA 0
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
+
+#undef LOCAL
 
 END_PROC_TYPE(Default):
 .size PROC_TYPE(Default),END_PROC_TYPE(Default)-PROC_TYPE(Default)
@@ -212,10 +218,12 @@ PROC_TYPE(rgb):
 #define GLIDE_PACK_ALPHA 0
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
+
+#undef LOCAL
 
 END_PROC_TYPE(rgb):
 .size PROC_TYPE(rgb),END_PROC_TYPE(rgb)-PROC_TYPE(rgb)
@@ -233,10 +241,12 @@ PROC_TYPE(argb):
 #define GLIDE_PACK_ALPHA 1
 #define GLIDE_GENERIC_SETUP 0
 #include "xdraw2.inc.S"
-#define GLIDE_GENERIC_SETUP 0
-#define GLIDE_PACK_ALPHA 0
-#define GLIDE_PACK_RGB 0
-#define GLIDE_CULLING 0
+#undef GLIDE_GENERIC_SETUP
+#undef GLIDE_PACK_ALPHA
+#undef GLIDE_PACK_RGB
+#undef GLIDE_CULLING
+
+#undef LOCAL
 
 END_PROC_TYPE(argb):
 .size PROC_TYPE(argb),END_PROC_TYPE(argb)-PROC_TYPE(argb)
