diff -ur macstl-orig/unix/Makefile macstl/unix/Makefile
--- macstl-orig/unix/Makefile	2010-04-18 13:11:50.000000000 -0700
+++ macstl/unix/Makefile	2010-04-18 13:20:46.000000000 -0700
@@ -2,7 +2,7 @@
 
 CC = g++
 
-ifeq ($(shell uname -m | grep -o ppc), ppc)
+ifeq ($(shell uname -p | grep -o powerpc), powerpc)
 PLATFORM = PPC
 else 
 ifeq ($(shell uname -m | grep -o 86), 86)
@@ -11,17 +12,22 @@
 endif
 
 ifeq ($(PLATFORM), PPC)
-COMMON_OPT = -maltivec -O3 -static -lstdc++ -lm
+COMMON_OPT = -faltivec -O3
 else
 ifeq ($(PLATFORM), x86)
-COMMON_OPT = -march=pentium4 -mfpmath=sse -O3 -static -lstdc++ -lm
+COMMON_OPT = -mfpmath=sse -O3
+# patch: let compiler_wrapper set -arch to i386 or x86_64
 endif
 endif
+# COMMON_OPT += -static -lstdc++ -lm
+# patch: paranoid check standard conformance and cleanliness
+COMMON_OPT += -Wall -W -Werror -ansi -pedantic-errors -Wno-long-long
 
 all : benchmark mmaptest vectest
 
 benchmark : ../test/benchmark.cpp common.h
-	$(CC) $(COMMON_OPT) -fno-unit-at-time -I$(MACSTL_DIR) $< -o $@
+	$(CC) $(COMMON_OPT) -I$(MACSTL_DIR) $< -o $@
+# patch: unknown flag -fno-unit-at-a-time 
 
 mmaptest : ../test/mmaptest.cpp
 	$(CC) $(COMMON_OPT) -I$(MACSTL_DIR) $< -o $@
diff -ur macstl-orig/macstl/impl/vec_altivec.h macstl/macstl/impl/vec_altivec.h
--- macstl-orig/macstl/impl/vec_altivec.h    2005-09-04 18:07:46.000000000 -0700
+++ macstl/macstl/impl/vec_altivec.h    2010-04-18 15:43:35.000000000 -0700
@@ -4261,7 +4261,7 @@
 				result = altivec::max (result, altivec::slo (result, vec <unsigned char, 16>::fill <16> ()));
 				result = altivec::max (result, altivec::slo (result, vec <unsigned char, 16>::fill <32> ()));
 				return altivec::max (result, altivec::slo (result, vec <unsigned char, 16>::fill <64> ())) [0];
-			};
+			}
 
 		INLINE unsigned short accumulator <maximum <macstl::vec <unsigned short, 8>, macstl::vec <unsigned short, 8> > >::operator() (const macstl::vec <unsigned short, 8>& lhs) const
 			{
diff -ur macstl-orig/macstl/impl/vec_mmx.h macstl/macstl/impl/vec_mmx.h
--- macstl-orig/macstl/impl/vec_mmx.h	2005-09-04 08:15:33.000000000 -0700
+++ macstl/macstl/impl/vec_mmx.h	2010-04-18 14:47:30.000000000 -0700
@@ -290,7 +290,7 @@
 										__m64 vec;
 									};
 									
-								static const union_type un = {v0, v1};
+								static const union_type un = {{v0, v1}};
 								return un.vec;
 							}
 					};
@@ -319,7 +319,7 @@
 										__m128 vec;
 									};
 									
-								static const union_type un = {v0, v1, v2, v3};
+								static const union_type un = {{v0, v1, v2, v3}};
 								return un.vec;
 							}
 					};
@@ -349,7 +349,7 @@
 										__m128d vec;
 									};
 									
-								static const union_type un = {v0, v1, v2, v3};
+								static const union_type un = {{v0, v1, v2, v3}};
 								return un.vec;
 							}
 					};
@@ -372,7 +372,7 @@
 										__m128i vec;
 									};
 									
-								static const union_type un = {v0, v1, v2, v3};
+								static const union_type un = {{v0, v1, v2, v3}};
 								return un.vec;
 							}
 					};
@@ -1607,7 +1607,7 @@
 					static INLINE const vec set (
 						value_type v0, value_type v1)
 						{
-							union_type un = {v0, v1};
+							union_type un = {{v0, v1}};
 							return un.vec;
 						}
 
@@ -1663,7 +1663,7 @@
 					static INLINE const vec set (
 						value_type v0, value_type v1)
 						{
-							union_type un = {v0, v1};
+							union_type un = {{v0, v1}};
 							return un.vec;
 						}
 
@@ -1719,7 +1719,7 @@
 					static INLINE const vec set (
 						value_type v0, value_type v1)
 						{
-							union_type un = {v0.data (), v1.data ()};
+							union_type un = {{v0.data (), v1.data ()}};
 							return un.vec;
 						}
 
@@ -2775,7 +2775,9 @@
 
 				DEFINE_MMX_UNARY_FUNCTION_WITH_LITERAL (srai, _mm_srai_epi16, M128I_I16, M128I_I16)
 				DEFINE_MMX_UNARY_FUNCTION_WITH_LITERAL (srai, _mm_srai_epi32, M128I_I32, M128I_I32)
+#if	0 && defined(__x86_64__)
 				DEFINE_MMX_UNARY_FUNCTION_WITH_LITERAL (srai, _mm_srai_epi64, M128I_I64, M128I_I64)
+#endif
 
 				DEFINE_MMX_BINARY_FUNCTION (srl, _mm_srl_epi16, M128I_I16, M128I_U16, M128I_I16)
 				DEFINE_MMX_BINARY_FUNCTION (srl, _mm_srl_epi16, M128I_U16, M128I_U16, M128I_U16)
diff -ur macstl-orig/macstl/vec.h macstl/macstl/vec.h
--- macstl-orig/macstl/vec.h	2005-08-17 08:15:28.000000000 -0700
+++ macstl/macstl/vec.h	2010-04-18 14:53:09.000000000 -0700
@@ -429,7 +429,7 @@
 
 //@{
 DEFINE_VEC_COMMON_UNARY_FUNCTION(operator+,identity)
-DEFINE_VEC_COMMON_UNARY_FUNCTION(operator+,negate)
+DEFINE_VEC_COMMON_UNARY_FUNCTION(operator-,negate)
 DEFINE_VEC_COMMON_UNARY_FUNCTION(operator~,bitwise_not)
 //@}
 
@@ -452,8 +452,8 @@
 DEFINE_VEC_COMMON_BINARY_FUNCTION(operator+,plus)
 DEFINE_VEC_COMMON_BINARY_FUNCTION(operator-,minus)
 DEFINE_VEC_COMMON_BINARY_FUNCTION(operator^,bitwise_xor)
-DEFINE_VEC_COMMON_BINARY_FUNCTION(operator-,bitwise_and)
-DEFINE_VEC_COMMON_BINARY_FUNCTION(operator-,bitwise_or)
+DEFINE_VEC_COMMON_BINARY_FUNCTION(operator&,bitwise_and)
+DEFINE_VEC_COMMON_BINARY_FUNCTION(operator|,bitwise_or)
 DEFINE_VEC_COMMON_BINARY_FUNCTION(operator<<,shift_left)
 DEFINE_VEC_COMMON_BINARY_FUNCTION(operator>>,shift_right)
 //@}
