1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Localize our dependencies on the way to create NAN or INFINITY.

Per recent proposal to pghackers.
This commit is contained in:
Tom Lane
2004-03-15 03:29:22 +00:00
parent 89ab5c4abf
commit 1bc2d544b9
9 changed files with 106 additions and 81 deletions

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/include/port/solaris.h,v 1.10 2003/12/23 03:31:30 momjian Exp $ */
/* $PostgreSQL: pgsql/src/include/port/solaris.h,v 1.11 2004/03/15 03:29:22 tgl Exp $ */
/*
* Sort this out for all operating systems some time. The __xxx
@ -35,24 +35,3 @@
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#endif
#ifndef NAN
#if defined(__GNUC__) && defined(__i386__)
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
#endif
#define NAN \
(__extension__ ((union { unsigned char __c[8]; double __d; }) \
{ __nan_bytes }).__d)
#else
/* not GNUC and i386 */
#define NAN (0.0/0.0)
#endif /* GCC. */
#endif /* not NAN */