Ticket #113: probe-MS-header-sal.patch
| File probe-MS-header-sal.patch, 3.3 KB (added by fperrad, 4 years ago) |
|---|
-
config/auto/headers.pm
104 104 if ( $conf->data->get_p5('OSNAME') eq "msys" ) { 105 105 push @extra_headers, qw(sysmman.h netdb.h); 106 106 } 107 108 if ( $conf->data->get_p5('OSNAME') eq "MSWin32" ) { 109 # Microsoft provides two annotations mechanisms. __declspec, which has been 110 # around for a while, and Microsoft's standard source code annotation 111 # language (SAL), introduced with Visual C++ 8.0. 112 # See <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>, 113 # <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>. 114 push @extra_headers, qw(sal.h); 115 } 116 107 117 return @extra_headers; 108 118 } 109 119 -
config/auto/msvc.pm
90 90 # To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help 91 91 # for details. 92 92 $conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" ); 93 94 # Microsoft provides two annotations mechanisms. __declspec, which has been95 # around for a while, and Microsoft's standard source code annotation96 # language (SAL), introduced with Visual C++ 8.0.97 # See <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>,98 # <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>.99 $conf->data->set( HAS_MSVC_SAL => 1 );100 93 } 101 94 return 1; 102 95 } -
include/parrot/compiler.h
99 99 */ 100 100 #define UNUSED(a) /*@-noeffect*/if (0) (void)(a)/*@=noeffect*/; 101 101 102 /* 64-bit CL has some problems, so this section here is going to try to fix them */ 103 #ifdef PARROT_HAS_MSVC_SAL 104 # ifdef _WIN64 105 /* CL64 can't seem to find sal.h, so take that out of the equation */ 106 # undef PARROT_HAS_MSVC_SAL 107 /* CL64 complains about not finding _iob, so this might fix it */ 108 109 110 # endif 111 #endif 112 113 #ifdef PARROT_HAS_MSVC_SAL 102 #ifdef PARROT_HAS_HEADER_SAL 103 /* 104 * Microsoft provides two annotations mechanisms. __declspec, which has been 105 * around for a while, and Microsoft's standard source code annotation 106 * language (SAL), introduced with Visual C++ 8.0. 107 * See <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>, 108 * <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>. 109 */ 114 110 # include <sal.h> 115 111 # define PARROT_CAN_RETURN_NULL /*@null@*/ __maybenull 116 112 # define PARROT_CANNOT_RETURN_NULL /*@notnull@*/ __notnull 117 113 #else 118 114 # define PARROT_CAN_RETURN_NULL /*@null@*/ 119 115 # define PARROT_CANNOT_RETURN_NULL /*@notnull@*/ 120 #endif 116 #endif /* PARROT_HAS_HEADER_SAL */ 121 117 122 118 #define PARROT_DEPRECATED __attribute__deprecated__ 123 119 … … 142 138 /* Function argument instrumentation */ 143 139 /* For explanations of the annotations, see http://www.splint.org/manual/manual.html */ 144 140 145 #ifdef PARROT_HAS_ MSVC_SAL141 #ifdef PARROT_HAS_HEADER_SAL 146 142 # define NOTNULL(x) /*@notnull@*/ __notnull x 147 143 /* The pointer passed may not be NULL */ 148 144
