      {
          // Open binary output file stream.
 -        openmode createAttr = std::ios::out;
-+        std::_Ios_Openmode createAttr = std::ios::out;
++        std::ios_base::openmode createAttr = std::ios::out;
  #if defined(HAVE_IOS_BIN)
          createAttr |= std::ios::bin;
  #else

     {
         // Open ASCII output file stream.
-        openmode createAttr = std::ios::out;
+        std::_Ios_Openmode createAttr = std::ios::out;
         if ( overWriteFlag )
             createAttr |= std::ios::trunc;
         else

     {
         // Open binary output file stream.
-        openmode createAttr = std::ios::out;
+        std::ios_base::openmode createAttr = std::ios::out;
 #if defined(HAVE_IOS_BIN)
         createAttr |= std::ios::bin;
 #else
