Rename new float and int conversion routines to avoid conflicts with

system calls on AIX (and probably other machines too).
This commit is contained in:
Thomas G. Lockhart 1997-05-14 04:35:10 +00:00
parent d906936e0e
commit 9fd868d16a
3 changed files with 28 additions and 28 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.14 1997/05/11 15:11:38 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.15 1997/05/14 04:35:10 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -24,7 +24,7 @@
* float4eq, float4ne, float4lt, float4le, float4gt, float4ge
* float8eq, float8ne, float8lt, float8le, float8gt, float8ge
* Conversion routines:
* ftod, dtof, itod, dtoi, i2tod, dtoi2, itof, ftoi, i2tof, ftoi2
* ftod, dtof, i4tod, dtoi4, i2tod, dtoi2, itof, ftoi, i2tof, ftoi2
*
* Random float8 ops:
* dround, dtrunc, dsqrt, dcbrt, dpow, dexp, dlog1
@ -743,17 +743,17 @@ float32 dtof(float64 num)
/*
* dtoi - converts a float8 number to an int4 number
* dtoi4 - converts a float8 number to an int4 number
*/
int32 dtoi(float64 num)
int32 dtoi4(float64 num)
{
int32 result;
if (!num)
elog(WARN,"dtoi: unable to convert null",NULL);
elog(WARN,"dtoi4: unable to convert null",NULL);
if ((*num < INT_MIN) || (*num > INT_MAX))
elog(WARN,"dtoi: integer out of range",NULL);
elog(WARN,"dtoi4: integer out of range",NULL);
result = rint(*num);
return(result);
@ -779,9 +779,9 @@ int16 dtoi2(float64 num)
/*
* itod - converts an int4 number to a float8 number
* i4tod - converts an int4 number to a float8 number
*/
float64 itod(int32 num)
float64 i4tod(int32 num)
{
float64 result;
@ -807,17 +807,17 @@ float64 i2tod(int16 num)
/*
* ftoi - converts a float8 number to an int4 number
* ftoi4 - converts a float8 number to an int4 number
*/
int32 ftoi(float32 num)
int32 ftoi4(float32 num)
{
int32 result;
if (!num)
elog(WARN,"ftoi: unable to convert null",NULL);
elog(WARN,"ftoi4: unable to convert null",NULL);
if ((*num < INT_MIN) || (*num > INT_MAX))
elog(WARN,"ftoi: integer out of range",NULL);
elog(WARN,"ftoi4: integer out of range",NULL);
result = rint(*num);
return(result);
@ -843,9 +843,9 @@ int16 ftoi2(float32 num)
/*
* itof - converts an int4 number to a float8 number
* i4tof - converts an int4 number to a float8 number
*/
float32 itof(int32 num)
float32 i4tof(int32 num)
{
float32 result;

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.21 1997/05/11 15:19:33 thomas Exp $
* $Id: pg_proc.h,v 1.22 1997/05/14 04:34:19 thomas Exp $
*
* NOTES
* 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
DATA(insert OID = 313 ( i2toi4 PGUID 11 f t f 1 f 23 "21" 100 0 0 100 foo bar ));
DATA(insert OID = 314 ( i4toi2 PGUID 11 f t f 1 f 21 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 315 ( keyfirsteq PGUID 11 f t f 2 f 16 "0 21" 100 0 0 100 foo bar ));
DATA(insert OID = 316 ( itod PGUID 11 f t f 1 f 701 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 317 ( dtoi PGUID 11 f t f 1 f 23 "701" 100 0 0 100 foo bar ));
DATA(insert OID = 318 ( itof PGUID 11 f t f 1 f 700 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 319 ( ftoi PGUID 11 f t f 1 f 23 "700" 100 0 0 100 foo bar ));
DATA(insert OID = 316 ( i4tod PGUID 11 f t f 1 f 701 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 317 ( dtoi4 PGUID 11 f t f 1 f 23 "701" 100 0 0 100 foo bar ));
DATA(insert OID = 318 ( i4tof PGUID 11 f t f 1 f 700 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 319 ( ftoi4 PGUID 11 f t f 1 f 23 "700" 100 0 0 100 foo bar ));
DATA(insert OID = 320 ( rtinsert PGUID 11 f t f 5 f 23 "0" 100 0 0 100 foo bar ));
DATA(insert OID = 321 ( rtdelete PGUID 11 f t f 2 f 23 "0" 100 0 0 100 foo bar ));
@ -907,14 +907,14 @@ DATA(insert OID = 1405 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 10
DATA(insert OID = 1406 ( float8 PGUID 14 f t f 1 f 701 "701" 100 0 0 100 "select $1" - ));
DATA(insert OID = 1407 ( float8 PGUID 14 f t f 1 f 701 "700" 100 0 0 100 "select ftod($1)" - ));
DATA(insert OID = 1408 ( float8 PGUID 14 f t f 1 f 701 "23" 100 0 0 100 "select itod($1)" - ));
DATA(insert OID = 1408 ( float8 PGUID 14 f t f 1 f 701 "23" 100 0 0 100 "select i4tod($1)" - ));
DATA(insert OID = 1409 ( float8 PGUID 14 f t f 1 f 701 "21" 100 0 0 100 "select i2tod($1)" - ));
DATA(insert OID = 1410 ( float4 PGUID 14 f t f 1 f 700 "23" 100 0 0 100 "select itof($1)" - ));
DATA(insert OID = 1410 ( float4 PGUID 14 f t f 1 f 700 "23" 100 0 0 100 "select i4tof($1)" - ));
DATA(insert OID = 1411 ( float4 PGUID 14 f t f 1 f 700 "21" 100 0 0 100 "select i2tof($1)" - ));
DATA(insert OID = 1412 ( int4 PGUID 14 f t f 1 f 23 "23" 100 0 0 100 "select $1" - ));
DATA(insert OID = 1413 ( int4 PGUID 14 f t f 1 f 23 "701" 100 0 0 100 "select dtoi($1)" - ));
DATA(insert OID = 1413 ( int4 PGUID 14 f t f 1 f 23 "701" 100 0 0 100 "select dtoi4($1)" - ));
DATA(insert OID = 1414 ( int4 PGUID 14 f t f 1 f 23 "21" 100 0 0 100 "select i2toi4($1)" - ));
DATA(insert OID = 1415 ( int4 PGUID 14 f t f 1 f 23 "700" 100 0 0 100 "select ftoi($1)" - ));
DATA(insert OID = 1415 ( int4 PGUID 14 f t f 1 f 23 "700" 100 0 0 100 "select ftoi4($1)" - ));
DATA(insert OID = 1416 ( int2 PGUID 14 f t f 1 f 21 "21" 100 0 0 100 "select $1" - ));
DATA(insert OID = 1417 ( int2 PGUID 14 f t f 1 f 21 "23" 100 0 0 100 "select i4toi2($1)" - ));
DATA(insert OID = 1418 ( int2 PGUID 14 f t f 1 f 21 "701" 100 0 0 100 "select dtoi2($1)" - ));

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.17 1997/05/11 15:13:47 thomas Exp $
* $Id: builtins.h,v 1.18 1997/05/14 04:33:41 thomas Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
@ -303,14 +303,14 @@ extern bool float8le(float64 arg1, float64 arg2);
extern bool float8gt(float64 arg1, float64 arg2);
extern bool float8ge(float64 arg1, float64 arg2);
extern float64 ftod(float32 num);
extern float64 itod(int32 num);
extern float64 i4tod(int32 num);
extern float64 i2tod(int16 num);
extern float32 dtof(float64 num);
extern int32 dtoi(float64 num);
extern int32 dtoi4(float64 num);
extern int16 dtoi2(float64 num);
extern float32 itof(int32 num);
extern float32 i4tof(int32 num);
extern float32 i2tof(int16 num);
extern int32 ftoi(float32 num);
extern int32 ftoi4(float32 num);
extern int16 ftoi2(float32 num);
extern float64 dround(float64 arg1);
extern float64 dtrunc(float64 arg1);