[svn:parrot] r39996 - in trunk: config/auto include/parrot
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sat Jul 11 07:29:44 UTC 2009
Author: fperrad
Date: Sat Jul 11 07:29:42 2009
New Revision: 39996
URL: https://trac.parrot.org/parrot/changeset/39996
Log:
[config] refactor MSVC SAL
see TT #824
Modified:
trunk/config/auto/msvc.pm
trunk/include/parrot/compiler.h
Modified: trunk/config/auto/msvc.pm
==============================================================================
--- trunk/config/auto/msvc.pm Sat Jul 11 05:54:48 2009 (r39995)
+++ trunk/config/auto/msvc.pm Sat Jul 11 07:29:42 2009 (r39996)
@@ -90,6 +90,13 @@
# To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help
# for details.
$conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" );
+
+ # Microsoft provides two annotations mechanisms. __declspec, which has been
+ # around for a while, and Microsoft's standard source code annotation
+ # language (SAL), introduced with Visual C++ 8.0.
+ # See <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>,
+ # <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>.
+ $conf->data->set( HAS_MSVC_SAL => 1 );
}
return 1;
}
Modified: trunk/include/parrot/compiler.h
==============================================================================
--- trunk/include/parrot/compiler.h Sat Jul 11 05:54:48 2009 (r39995)
+++ trunk/include/parrot/compiler.h Sat Jul 11 07:29:42 2009 (r39996)
@@ -14,20 +14,6 @@
* for a given compiler. They are based on GCC's __attribute__ functionality.
*/
-/*
- * Microsoft provides two annotations mechanisms. __declspec, which has been
- * around for a while, and Microsoft's standard source code annotation
- * language (SAL), introduced with Visual C++ 8.0.
- * See <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>,
- * <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>.
- */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-# define PARROT_HAS_SAL 1
-# include <sal.h>
-#else
-# define PARROT_HAS_SAL 0
-#endif
-
#ifdef HASATTRIBUTE_NEVER_WORKS
# error This attribute can never succeed. Something has mis-sniffed your configuration.
#endif
@@ -113,7 +99,8 @@
*/
#define UNUSED(a) /*@-noeffect*/if (0) (void)(a)/*@=noeffect*/;
-#if PARROT_HAS_SAL
+#ifdef PARROT_HAS_MSVC_SAL
+# include <sal.h>
# define PARROT_CAN_RETURN_NULL /*@null@*/ __maybenull
# define PARROT_CANNOT_RETURN_NULL /*@notnull@*/ __notnull
#else
More information about the parrot-commits
mailing list