gnutls_srtp_get_profile_by_name -> gnutls_srtp_get_profile_id
[gnutls.git] / gl / tests / infinity.h
blob631473ecd03ead9b06d9309f742ee3e37345bd26
1 /* Macros for infinity.
2 Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Infinityf () returns a 'float' +Infinity. */
20 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
21 #if defined _MSC_VER
22 static float
23 Infinityf ()
25 static float zero = 0.0f;
26 return 1.0f / zero;
28 #else
29 # define Infinityf() (1.0f / 0.0f)
30 #endif
33 /* Infinityd () returns a 'double' +Infinity. */
35 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
36 #if defined _MSC_VER
37 static double
38 Infinityd ()
40 static double zero = 0.0;
41 return 1.0 / zero;
43 #else
44 # define Infinityd() (1.0 / 0.0)
45 #endif
48 /* Infinityl () returns a 'long double' +Infinity. */
50 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
51 #if defined _MSC_VER
52 static double
53 Infinityl ()
55 static long double zero = 0.0L;
56 return 1.0L / zero;
58 #else
59 # define Infinityl() (1.0L / 0.0L)
60 #endif