Thrift: MinGW port.

Summary:
Todd Berman from imeem has contributed a patch that allows
the Thrift compiler to be built with MinGW and run on Windows.

Reviewed By: mcslee

Test Plan:
Built the compiler from scratch on Linux.
If my changes messed up the MinGW build, I'm sure Todd will yell at me.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665420 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_field.h b/compiler/cpp/src/parse/t_field.h
index 35ee1a2..fb882a9 100644
--- a/compiler/cpp/src/parse/t_field.h
+++ b/compiler/cpp/src/parse/t_field.h
@@ -34,7 +34,7 @@
     type_(type),
     name_(name),
     key_(key),
-    req_(OPT_IN_REQ_OUT),
+    req_(T_OPT_IN_REQ_OUT),
     value_(NULL),
     xsd_optional_(false),
     xsd_nillable_(false),
@@ -55,9 +55,9 @@
   }
 
   enum e_req {
-    REQUIRED,
-    OPTIONAL,
-    OPT_IN_REQ_OUT
+    T_REQUIRED,
+    T_OPTIONAL,
+    T_OPT_IN_REQ_OUT,
   };
 
   void set_req(e_req req) {
@@ -117,7 +117,7 @@
   // but it does the same thing.
   std::string get_fingerprint_material() const {
     return boost::lexical_cast<std::string>(key_) + ":" +
-      (req_ == OPTIONAL ? "opt-" : "") +
+      ((req_ == T_OPTIONAL) ? "opt-" : "") +
       type_->get_fingerprint_material();
   }