~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/libvpsc/isnan.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Kees Cook, Ted Gould
  • Date: 2008-02-10 14:20:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080210142016-vcnb2zqyhszu0xvb
Tags: 0.46~pre1-0ubuntu1
[ Kees Cook ]
* debian/control:
  - add libgtkspell-dev build-dep to gain GtkSpell features (LP: #183547).
  - update Standards version (no changes needed).
  - add Vcs and Homepage fields.
  - switch to new python-lxml dep.
* debian/{control,rules}: switch from dpatch to quilt for more sanity.
* debian/patches/20_fix_glib_and_gxx43_ftbfs.patch:
  - merged against upstream fixes.
  - added additional fixes for newly written code.
* debian/rules: enable parallel building.

[ Ted Gould ]
* Updating POTFILES.in to make it so things build correctly.
* debian/control:
  - add ImageMagick++ and libboost-dev to build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __ISNAN_H__
2
 
#define __ISNAN_H__
3
 
 
4
 
/*
5
 
 * Temporary fix for various misdefinitions of isnan().
6
 
 * isnan() is becoming undef'd in some .h files. 
7
 
 * #include this last in your .cpp file to get it right.
8
 
 *
9
 
 * The problem is that isnan and isfinite are part of C99 but aren't part of
10
 
 * the C++ standard (which predates C99).
11
 
 *
12
 
 * Authors:
13
 
 *   Inkscape groupies and obsessive-compulsives
14
 
 *
15
 
 * Copyright (C) 2004 authors
16
 
 *
17
 
 * Released under GNU LGPL, read the file 'COPYING' for more information
18
 
 *
19
 
 * 2005 modification hereby placed in public domain.  Probably supercedes the 2004 copyright
20
 
 * for the code itself.
21
 
 */
22
 
 
23
 
#include <math.h>
24
 
/* You might try changing the above to <cmath> if you have problems.
25
 
 * Whether you use math.h or cmath, you may need to edit the .cpp file
26
 
 * and/or other .h files to use the same header file.
27
 
 */
28
 
 
29
 
#if defined(__isnan)
30
 
# define isNaN(_a) (__isnan(_a))        /* MacOSX/Darwin definition < 10.4 */
31
 
#elif defined(WIN32) || defined(_isnan)
32
 
# define isNaN(_a) (_isnan(_a))         /* Win32 definition */
33
 
#elif defined(isnan) || defined(__FreeBSD__)
34
 
# define isNaN(_a) (isnan(_a))          /* GNU definition */
35
 
#else
36
 
# define isNaN(_a) (std::isnan(_a))
37
 
#endif
38
 
/* If the above doesn't work, then try (a != a).
39
 
 * Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
40
 
 * giving information about what platform and compiler version you're using.
41
 
 */
42
 
 
43
 
 
44
 
#if defined(__isfinite)
45
 
# define isFinite(_a) (__isfinite(_a))  /* MacOSX/Darwin definition < 10.4 */
46
 
#elif defined(isfinite)
47
 
# define isFinite(_a) (isfinite(_a))
48
 
#else
49
 
# define isFinite(_a) (std::isfinite(_a))
50
 
#endif
51
 
/* If the above doesn't work, then try (finite(_a) && !isNaN(_a)) or (!isNaN((_a) - (_a))).
52
 
 * Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
53
 
 * giving information about what platform and compiler version you're using.
54
 
 */
55
 
 
56
 
 
57
 
#endif /* __ISNAN_H__ */