ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.h
(Generate patch)

Comparing libecb/ecb.h (file contents):
Revision 1.131 by root, Tue Mar 25 17:44:10 2014 UTC vs.
Revision 1.137 by root, Tue Oct 14 14:01:07 2014 UTC

23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- 25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
26 * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 26 * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 * OF THE POSSIBILITY OF SUCH DAMAGE. 27 * OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * Alternatively, the contents of this file may be used under the terms of
30 * the GNU General Public License ("GPL") version 2 or any later version,
31 * in which case the provisions of the GPL are applicable instead of
32 * the above. If you wish to allow the use of your version of this file
33 * only under the terms of the GPL and not to allow others to use your
34 * version of this file under the BSD license, indicate your decision
35 * by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL. If you do not delete the
37 * provisions above, a recipient may use your version of this file under
38 * either the BSD or the GPL.
28 */ 39 */
29 40
30#ifndef ECB_H 41#ifndef ECB_H
31#define ECB_H 42#define ECB_H
32 43
79 * causing enormous grief in return for some better fake benchmark numbers. 90 * causing enormous grief in return for some better fake benchmark numbers.
80 * or so. 91 * or so.
81 * we try to detect these and simply assume they are not gcc - if they have 92 * we try to detect these and simply assume they are not gcc - if they have
82 * an issue with that they should have done it right in the first place. 93 * an issue with that they should have done it right in the first place.
83 */ 94 */
84#ifndef ECB_GCC_VERSION
85 #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__ 95#if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
86 #define ECB_GCC_VERSION(major,minor) 0 96 #define ECB_GCC_VERSION(major,minor) 0
87 #else 97#else
88 #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) 98 #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
89 #endif
90#endif 99#endif
91 100
92#define ECB_CPP (__cplusplus+0) 101#define ECB_CPP (__cplusplus+0)
93#define ECB_CPP11 (__cplusplus >= 201103L) 102#define ECB_CPP11 (__cplusplus >= 201103L)
94 103
311 #define ecb_decltype(x) __decltype(x) 320 #define ecb_decltype(x) __decltype(x)
312#elif ECB_GCC_VERSION(3,0) 321#elif ECB_GCC_VERSION(3,0)
313 #define ecb_decltype(x) __typeof(x) 322 #define ecb_decltype(x) __typeof(x)
314#endif 323#endif
315 324
325#if _MSC_VER >= 1300
326 #define ecb_deprecated __declspec(deprecated)
327#else
328 #define ecb_deprecated ecb_attribute ((__deprecated__))
329#endif
330
316#define ecb_noinline ecb_attribute ((__noinline__)) 331#define ecb_noinline ecb_attribute ((__noinline__))
317#define ecb_unused ecb_attribute ((__unused__)) 332#define ecb_unused ecb_attribute ((__unused__))
318#define ecb_const ecb_attribute ((__const__)) 333#define ecb_const ecb_attribute ((__const__))
319#define ecb_pure ecb_attribute ((__pure__)) 334#define ecb_pure ecb_attribute ((__pure__))
320 335
336/* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx __declspec(noreturn) */
321#if ECB_C11 337#if ECB_C11
322 #define ecb_noreturn _Noreturn 338 #define ecb_noreturn _Noreturn
323#else 339#else
324 #define ecb_noreturn ecb_attribute ((__noreturn__)) 340 #define ecb_noreturn ecb_attribute ((__noreturn__))
325#endif 341#endif
604 || defined __m68k__ \ 620 || defined __m68k__ \
605 || defined __m88k__ \ 621 || defined __m88k__ \
606 || defined __sh__ \ 622 || defined __sh__ \
607 || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 \ 623 || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 \
608 || (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) \ 624 || (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) \
609 | defined __aarch64__ 625 || defined __aarch64__
610 #define ECB_STDFP 1 626 #define ECB_STDFP 1
611 #include <string.h> /* for memcpy */ 627 #include <string.h> /* for memcpy */
612#else 628#else
613 #define ECB_STDFP 0 629 #define ECB_STDFP 0
614#endif 630#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines