pg85-ecpg-fix-nan-inf-12-ctxdiff.patch

text/x-patch

Filename: pg85-ecpg-fix-nan-inf-12-ctxdiff.patch
Type: text/x-patch
Part: 2
Message: Re: NaN/Inf fix for ECPG

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/interfaces/ecpg/ecpglib/data.c 3 3
*** pgsql.orig/src/interfaces/ecpg/ecpglib/data.c	2010-02-04 11:10:03.000000000 +0100
--- pgsql/src/interfaces/ecpg/ecpglib/data.c	2010-02-25 12:57:49.000000000 +0100
***************
*** 85,94 ****
  static double
  get_float8_nan(void)
  {
! #ifdef NAN
! 	return (double) NAN;  
! #else
  	return (double) (0.0 / 0.0);
  #endif
  }
  
--- 85,94 ----
  static double
  get_float8_nan(void)
  {
! #if !defined(NAN) || (defined(__NetBSD__) && defined(__mips__))
  	return (double) (0.0 / 0.0);
+ #else
+ 	return (double) NAN;
  #endif
  }