~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/nan.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* Macros for not-a-number.
4
 
   Copyright (C) 2007-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2012 Free Software Foundation, Inc.
5
3
 
6
4
   This program is free software: you can redistribute it and/or modify
7
5
   it under the terms of the GNU General Public License as published by
19
17
 
20
18
/* NaNf () returns a 'float' not-a-number.  */
21
19
 
22
 
/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
23
 
#ifdef __DECC
 
20
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
 
21
   on the expression 0.0 / 0.0.  */
 
22
#if defined __DECC || defined _MSC_VER
24
23
static float
25
24
NaNf ()
26
25
{
34
33
 
35
34
/* NaNd () returns a 'double' not-a-number.  */
36
35
 
37
 
/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
38
 
#ifdef __DECC
 
36
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
 
37
   on the expression 0.0 / 0.0.  */
 
38
#if defined __DECC || defined _MSC_VER
39
39
static double
40
40
NaNd ()
41
41
{
50
50
/* NaNl () returns a 'long double' not-a-number.  */
51
51
 
52
52
/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
53
 
   runtime type conversion.  */
 
53
   runtime type conversion.
 
54
   The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L.  */
54
55
#ifdef __sgi
55
56
static long double NaNl ()
56
57
{
57
58
  double zero = 0.0;
58
59
  return zero / zero;
59
60
}
 
61
#elif defined _MSC_VER
 
62
static long double
 
63
NaNl ()
 
64
{
 
65
  static long double zero = 0.0L;
 
66
  return zero / zero;
 
67
}
60
68
#else
61
69
# define NaNl() (0.0L / 0.0L)
62
70
#endif