--- log4cpp-1.0/src/PatternLayout.cpp	2010-07-23 10:26:35.000000000 -0400
+++ log4cpp-1.0/src/PatternLayout.cpp	2010-07-23 10:25:52.000000000 -0400
@@ -370,7 +370,9 @@
                         literal = "";
                     }
                     if ((minWidth != 0) || (maxWidth != 0)) {
-                        component = new FormatModifierComponent(component, std::abs(minWidth), maxWidth, minWidth < 0);
+                        if (minWidth < 0)
+                          minWidth *= -1;
+                        component = new FormatModifierComponent(component, minWidth, maxWidth, minWidth < 0);
                         minWidth = maxWidth = 0;
                     }
                     _components.push_back(component);
--- log4cpp-1.0/src/BasicLayout.cpp	2010-07-23 10:26:52.000000000 -0400
+++ log4cpp-1.0/src/BasicLayout.cpp	2010-07-23 10:13:19.000000000 -0400
@@ -14,6 +14,7 @@
 #ifdef LOG4CPP_HAVE_SSTREAM
 #include <sstream>
 #endif
+#include <memory>
 
 namespace log4cpp {
 
