ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/fptools.h
(Generate patch)

Comparing Convert-UUlib/uulib/fptools.h (file contents):
Revision 1.9 by root, Sun Feb 9 15:06:43 2020 UTC vs.
Revision 1.10 by root, Fri Feb 14 08:02:26 2020 UTC

8/* 8/*
9 * Some handy, nonstandard functions. Note that the original may 9 * Some handy, nonstandard functions. Note that the original may
10 * be both faster and better. ``better'', if your compiler allows 10 * be both faster and better. ``better'', if your compiler allows
11 * cleaner use of such functions by proper use of ``const''. 11 * cleaner use of such functions by proper use of ``const''.
12 * 12 *
13 * $Id: fptools.h,v 1.9 2020/02/09 15:06:43 root Exp $ 13 * $Id: fptools.h,v 1.10 2020/02/14 08:02:26 root Exp $
14 */ 14 */
15 15
16#ifndef FPTOOLS_H__ 16#ifndef FPTOOLS_H__
17#define FPTOOLS_H__ 17#define FPTOOLS_H__
18 18
25#define TOOLEXPORT 25#define TOOLEXPORT
26#endif 26#endif
27 27
28#ifdef __cplusplus 28#ifdef __cplusplus
29extern "C" { 29extern "C" {
30#endif
31
32/* relicensed from libecb with permission */
33#if 1
34
35#define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
36
37#if ECB_GCC_VERSION(3,1)
38 #define ecb_expect(expr,value) __builtin_expect ((expr),(value))
39#else
40 #define ecb_expect(expr,value) (expr)
41#endif
42
43#define ecb_expect_false(expr) ecb_expect (!!(expr), 0)
44#define ecb_expect_true(expr) ecb_expect (!!(expr), 1)
45
30#endif 46#endif
31 47
32#define _FP_free FP_free 48#define _FP_free FP_free
33#define _FP_strdup FP_strdup 49#define _FP_strdup FP_strdup
34#define _FP_strncpy FP_strncpy 50#define _FP_strncpy FP_strncpy

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines