Index: lib/Parrot/Configure/RunSteps.pm
===================================================================
--- lib/Parrot/Configure/RunSteps.pm	(revision 10497)
+++ lib/Parrot/Configure/RunSteps.pm	(working copy)
@@ -37,6 +37,7 @@
     inter/lex.pm
     inter/yacc.pm
     auto/gcc.pm
+    auto/msvc.pm
     init/optimize.pm
     inter/shlibs.pm
     inter/charset.pm
Index: config/auto/msvc.pm
===================================================================
--- config/auto/msvc.pm	(revision 0)
+++ config/auto/msvc.pm	(revision 0)
@@ -0,0 +1,75 @@
+# Copyright: 2005 The Perl Foundation.  All Rights Reserved.
+# $Id: $
+
+=head1 NAME
+
+config/auto/msvc.pm - Microsoft Visual C++ Compiler
+
+=head1 DESCRIPTION
+
+Determines whether the C compiler is actually C<Visual C++>.
+
+=cut
+
+package Configure::Step;
+
+use strict;
+use vars qw($description $result @args);
+
+use base qw(Parrot::Configure::Step::Base);
+
+use Parrot::Configure::Step ':auto';
+
+$description="Determining if your C compiler is actually Visual C++...";
+
+@args=qw(verbose);
+
+sub runstep {
+  my $self = shift;
+  my ($verbose) = @_;
+
+  cc_gen("config/auto/msvc/test_c.in");
+  cc_build();
+  my %msvc = eval cc_run() or die "Can't run the test program: $!";
+  cc_clean();
+
+  # Set msvcversion to undef.  This will also trigger any hints-file
+  # callbacks that depend on knowing whether or not we're using Visual C++.
+
+  # This key should always exist unless the program couldn't be run,
+  # which should have been caught by the 'die' above.
+  unless (exists $msvc{_MSC_VER}) {
+    Parrot::Configure::Data->set(msvcversion => undef);
+    return;
+  }
+  
+  my $major = int ($msvc{_MSC_VER} / 100);
+  my $minor = $msvc{_MSC_VER} % 100;
+  unless (defined $major && defined $minor) {
+    print " (no) " if $verbose;
+    $result = 'no';
+    Parrot::Configure::Data->set(msvcversion => undef);
+    return;
+  }
+
+  my $msvcversion = "$major.$minor";
+  print " (yep: $msvcversion )" if $verbose;
+  $result = 'yes';
+
+  Parrot::Configure::Data->set(
+    msvcversion => $msvcversion,
+  );
+
+  # Add Visual C++ specifics here
+  if ($msvcversion >= 14.00) {
+      # Version 14 (aka Visual C++ 2005) warns about unsafe, deprecated
+      # functions with the following message.
+      #
+      # This function or variable may be unsafe. Consider using xxx_s instead.
+      # To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help
+      # for details.
+      Parrot::Configure::Data->add(" ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE");
+  }
+}
+
+1;
Index: config/auto/msvc/test_c.in
===================================================================
--- config/auto/msvc/test_c.in	(revision 0)
+++ config/auto/msvc/test_c.in	(revision 0)
@@ -0,0 +1,31 @@
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+    puts("(");
+#ifdef _MSC_VER
+    printf("_MSC_VER => %d,\n", _MSC_VER);
+#else
+    printf("_MSC_VER => undef,\n");
+#endif
+
+#ifdef _MSC_FULL_VER
+    printf("_MSC_FULL_VER => %d,\n", _MSC_FULL_VER);
+#else
+    printf("_MSC_FULL_VER => undef,\n");
+#endif
+    puts(");");
+
+    return 0;
+}
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+ */
