Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8ae7ff

Browse files
committed
Fix for no platform NAN.
1 parentda361ee commitd8ae7ff

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

‎src/backend/utils/adt/inet_net_ntop.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#if defined(LIBC_SCCS)&& !defined(lint)
19-
staticconstcharrcsid[]="$Id: inet_net_ntop.c,v 1.3 1998/10/22 13:16:25 momjian Exp $";
19+
staticconstcharrcsid[]="$Id: inet_net_ntop.c,v 1.4 1999/01/01 04:17:13 momjian Exp $";
2020

2121
#endif
2222

@@ -189,7 +189,6 @@ inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
189189
char*odst=dst;
190190
char*t;
191191
size_tlen=4;
192-
u_intm;
193192
intb,tb;
194193

195194
if (bits<0||bits>32)

‎src/backend/utils/adt/network.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*is for IP V4 CIDR notation, but prepared for V6: just
44
*add the necessary bits where the comments indicate.
55
*
6-
*$Id: network.c,v 1.4 1998/10/29 16:13:07 tgl Exp $
6+
*$Id: network.c,v 1.5 1999/01/01 04:17:13 momjian Exp $
77
*Jon Postel RIP 16 Oct 1998
88
*/
99

@@ -389,8 +389,7 @@ network_network(inet *ip)
389389
{
390390
text*ret;
391391
intlen;
392-
char*ptr,
393-
tmp[sizeof("255.255.255.255/32")];
392+
chartmp[sizeof("255.255.255.255/32")];
394393

395394
if (ip_family(ip)==AF_INET)
396395
{

‎src/backend/utils/adt/numeric.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*1998 Jan Wieck
77
*
8-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.2 1998/12/30 20:46:05 wieck Exp $
8+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.3 1999/01/01 04:17:13 momjian Exp $
99
*
1010
* ----------
1111
*/
@@ -16,7 +16,7 @@
1616
#include<ctype.h>
1717
#include<float.h>
1818
#include<math.h>
19-
#include<nan.h>
19+
/*#include <nan.h> BSD/OS does not have this */
2020
#include<errno.h>
2121
#include<sys/types.h>
2222

@@ -1723,7 +1723,11 @@ numeric_float8(Numeric num)
17231723
if (NUMERIC_IS_NAN(num))
17241724
{
17251725
result= (float64)palloc(sizeof(float64data));
1726+
#ifdefNAN
17261727
*result=NAN;
1728+
#else
1729+
*result=num;
1730+
#endif
17271731
returnresult;
17281732
}
17291733

@@ -1773,7 +1777,11 @@ numeric_float4(Numeric num)
17731777
if (NUMERIC_IS_NAN(num))
17741778
{
17751779
result= (float32)palloc(sizeof(float32data));
1780+
#ifdefNAN
17761781
*result=NAN;
1782+
#else
1783+
*result=num;
1784+
#endif
17771785
returnresult;
17781786
}
17791787

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp