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

Commit9fd868d

Browse files
author
Thomas G. Lockhart
committed
Rename new float and int conversion routines to avoid conflicts with
system calls on AIX (and probably other machines too).
1 parentd906936 commit9fd868d

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.14 1997/05/11 15:11:38 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.15 1997/05/14 04:35:10 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -24,7 +24,7 @@
2424
* float4eq, float4ne, float4lt, float4le, float4gt, float4ge
2525
* float8eq, float8ne, float8lt, float8le, float8gt, float8ge
2626
*Conversion routines:
27-
* ftod, dtof,itod, dtoi, i2tod, dtoi2, itof, ftoi, i2tof, ftoi2
27+
* ftod, dtof,i4tod, dtoi4, i2tod, dtoi2, itof, ftoi, i2tof, ftoi2
2828
*
2929
*Random float8 ops:
3030
* dround, dtrunc, dsqrt, dcbrt, dpow, dexp, dlog1
@@ -743,17 +743,17 @@ float32 dtof(float64 num)
743743

744744

745745
/*
746-
*dtoi- converts a float8 number to an int4 number
746+
*dtoi4- converts a float8 number to an int4 number
747747
*/
748-
int32dtoi(float64num)
748+
int32dtoi4(float64num)
749749
{
750750
int32result;
751751

752752
if (!num)
753-
elog(WARN,"dtoi: unable to convert null",NULL);
753+
elog(WARN,"dtoi4: unable to convert null",NULL);
754754

755755
if ((*num<INT_MIN)|| (*num>INT_MAX))
756-
elog(WARN,"dtoi: integer out of range",NULL);
756+
elog(WARN,"dtoi4: integer out of range",NULL);
757757

758758
result=rint(*num);
759759
return(result);
@@ -779,9 +779,9 @@ int16 dtoi2(float64 num)
779779

780780

781781
/*
782-
*itod- converts an int4 number to a float8 number
782+
*i4tod- converts an int4 number to a float8 number
783783
*/
784-
float64itod(int32num)
784+
float64i4tod(int32num)
785785
{
786786
float64result;
787787

@@ -807,17 +807,17 @@ float64 i2tod(int16 num)
807807

808808

809809
/*
810-
*ftoi- converts a float8 number to an int4 number
810+
*ftoi4- converts a float8 number to an int4 number
811811
*/
812-
int32ftoi(float32num)
812+
int32ftoi4(float32num)
813813
{
814814
int32result;
815815

816816
if (!num)
817-
elog(WARN,"ftoi: unable to convert null",NULL);
817+
elog(WARN,"ftoi4: unable to convert null",NULL);
818818

819819
if ((*num<INT_MIN)|| (*num>INT_MAX))
820-
elog(WARN,"ftoi: integer out of range",NULL);
820+
elog(WARN,"ftoi4: integer out of range",NULL);
821821

822822
result=rint(*num);
823823
return(result);
@@ -843,9 +843,9 @@ int16 ftoi2(float32 num)
843843

844844

845845
/*
846-
*itof- converts an int4 number to a float8 number
846+
*i4tof- converts an int4 number to a float8 number
847847
*/
848-
float32itof(int32num)
848+
float32i4tof(int32num)
849849
{
850850
float32result;
851851

‎src/include/catalog/pg_proc.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_proc.h,v 1.21 1997/05/11 15:19:33 thomas Exp $
9+
* $Id: pg_proc.h,v 1.22 1997/05/14 04:34:19 thomas Exp $
1010
*
1111
* NOTES
1212
* The script catalog/genbki.sh reads this file and generates .bki
@@ -392,10 +392,10 @@ DATA(insert OID = 312 ( dtof PGUID 11 f t f 2 f 700 "701" 100 0 0
392392
DATA(insertOID=313 (i2toi4PGUID11ftf1f23"21"10000100foobar ));
393393
DATA(insertOID=314 (i4toi2PGUID11ftf1f21"23"10000100foobar ));
394394
DATA(insertOID=315 (keyfirsteqPGUID11ftf2f16"0 21"10000100foobar ));
395-
DATA(insertOID=316 (itodPGUID11ftf1f701"23"10000100foobar ));
396-
DATA(insertOID=317 (dtoiPGUID11ftf1f23"701"10000100foobar ));
397-
DATA(insertOID=318 (itofPGUID11ftf1f700"23"10000100foobar ));
398-
DATA(insertOID=319 (ftoiPGUID11ftf1f23"700"10000100foobar ));
395+
DATA(insertOID=316 (i4todPGUID11ftf1f701"23"10000100foobar ));
396+
DATA(insertOID=317 (dtoi4PGUID11ftf1f23"701"10000100foobar ));
397+
DATA(insertOID=318 (i4tofPGUID11ftf1f700"23"10000100foobar ));
398+
DATA(insertOID=319 (ftoi4PGUID11ftf1f23"700"10000100foobar ));
399399

400400
DATA(insertOID=320 (rtinsertPGUID11ftf5f23"0"10000100foobar ));
401401
DATA(insertOID=321 (rtdeletePGUID11ftf2f23"0"10000100foobar ));
@@ -907,14 +907,14 @@ DATA(insert OID = 1405 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 10
907907

908908
DATA(insertOID=1406 (float8PGUID14ftf1f701"701"10000100"select $1"- ));
909909
DATA(insertOID=1407 (float8PGUID14ftf1f701"700"10000100"select ftod($1)"- ));
910-
DATA(insertOID=1408 (float8PGUID14ftf1f701"23"10000100"selectitod($1)"- ));
910+
DATA(insertOID=1408 (float8PGUID14ftf1f701"23"10000100"selecti4tod($1)"- ));
911911
DATA(insertOID=1409 (float8PGUID14ftf1f701"21"10000100"select i2tod($1)"- ));
912-
DATA(insertOID=1410 (float4PGUID14ftf1f700"23"10000100"selectitof($1)"- ));
912+
DATA(insertOID=1410 (float4PGUID14ftf1f700"23"10000100"selecti4tof($1)"- ));
913913
DATA(insertOID=1411 (float4PGUID14ftf1f700"21"10000100"select i2tof($1)"- ));
914914
DATA(insertOID=1412 (int4PGUID14ftf1f23"23"10000100"select $1"- ));
915-
DATA(insertOID=1413 (int4PGUID14ftf1f23"701"10000100"selectdtoi($1)"- ));
915+
DATA(insertOID=1413 (int4PGUID14ftf1f23"701"10000100"selectdtoi4($1)"- ));
916916
DATA(insertOID=1414 (int4PGUID14ftf1f23"21"10000100"select i2toi4($1)"- ));
917-
DATA(insertOID=1415 (int4PGUID14ftf1f23"700"10000100"selectftoi($1)"- ));
917+
DATA(insertOID=1415 (int4PGUID14ftf1f23"700"10000100"selectftoi4($1)"- ));
918918
DATA(insertOID=1416 (int2PGUID14ftf1f21"21"10000100"select $1"- ));
919919
DATA(insertOID=1417 (int2PGUID14ftf1f21"23"10000100"select i4toi2($1)"- ));
920920
DATA(insertOID=1418 (int2PGUID14ftf1f21"701"10000100"select dtoi2($1)"- ));

‎src/include/utils/builtins.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: builtins.h,v 1.17 1997/05/11 15:13:47 thomas Exp $
9+
* $Id: builtins.h,v 1.18 1997/05/14 04:33:41 thomas Exp $
1010
*
1111
* NOTES
1212
* This should normally only be included by fmgr.h.
@@ -303,14 +303,14 @@ extern bool float8le(float64 arg1, float64 arg2);
303303
externboolfloat8gt(float64arg1,float64arg2);
304304
externboolfloat8ge(float64arg1,float64arg2);
305305
externfloat64ftod(float32num);
306-
externfloat64itod(int32num);
306+
externfloat64i4tod(int32num);
307307
externfloat64i2tod(int16num);
308308
externfloat32dtof(float64num);
309-
externint32dtoi(float64num);
309+
externint32dtoi4(float64num);
310310
externint16dtoi2(float64num);
311-
externfloat32itof(int32num);
311+
externfloat32i4tof(int32num);
312312
externfloat32i2tof(int16num);
313-
externint32ftoi(float32num);
313+
externint32ftoi4(float32num);
314314
externint16ftoi2(float32num);
315315
externfloat64dround(float64arg1);
316316
externfloat64dtrunc(float64arg1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp