Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e6e36408
Commit
e6e36408
authored
Feb 02, 1998
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move all the isinf() stuff from float.c to isinf.c, and build it according to
configure vs port specific #ifdef's...
parent
79f99a38
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
186 deletions
+181
-186
src/backend/parser/scan.c
src/backend/parser/scan.c
+2
-2
src/backend/port/isinf.c
src/backend/port/isinf.c
+54
-6
src/backend/utils/adt/float.c
src/backend/utils/adt/float.c
+1
-128
src/configure
src/configure
+103
-48
src/configure.in
src/configure.in
+3
-2
src/include/config.h.in
src/include/config.h.in
+18
-0
No files found.
src/backend/parser/scan.c
View file @
e6e36408
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1
0 1998/01/27 03:25:07
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1
1 1998/02/02 00:03:39
scrappy Exp $
*/
#define FLEX_SCANNER
...
...
@@ -539,7 +539,7 @@ char *yytext;
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1
0 1998/01/27 03:25:07
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1
1 1998/02/02 00:03:39
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
src/backend/port/isinf.c
View file @
e6e36408
/* $Id: isinf.c,v 1.
1 1998/01/15 20:54:37
scrappy Exp $ */
/* $Id: isinf.c,v 1.
2 1998/02/02 00:03:46
scrappy Exp $ */
#include <ieeefp.h>
#include <math.h>
#include "config.h"
#if HAVE_FPCLASS
# if HAVE_IEEEFP_H
# include <ieeefp.h>
# endif
int
isinf
(
double
d
)
{
fpclass_t
type
=
fpclass
(
d
);
switch
(
type
)
{
case
FP_SNAN
:
case
FP_QNAN
:
case
FP_NINF
:
case
FP_PINF
:
return
(
1
);
default:
break
;
}
return
(
0
);
}
#endif
#if defined(HAVE_FP_CLASS) || defined(HAVE_FP_CLASS_D)
# if HAVE_FP_CLASS_H
# include <fp_class.h>
# endif
int
isinf
(
x
)
double
x
;
{
#if HAVE_FP_CLASS
int
fpclass
=
fp_class
(
x
);
#else
int
fpclass
=
fp_class_d
(
x
);
#endif
if
(
fpclass
==
FP_POS_INF
)
return
(
1
);
if
(
fpclass
==
FP_NEG_INF
)
return
(
-
1
);
return
(
0
);
}
#endif
#if defined(HAVE_CLASS)
int
isinf
(
double
x
)
{
if
((
fpclass
(
x
)
==
FP_PINF
)
||
(
fpclass
(
x
)
==
FP_NINF
))
return
1
;
else
return
0
;
}
int
fpclass
=
class
(
x
);
if
(
fpclass
==
FP_PLUS_INF
)
return
(
1
);
if
(
fpclass
==
FP_MINUS_INF
)
return
(
-
1
);
return
(
0
);
}
#endif
src/backend/utils/adt/float.c
View file @
e6e36408
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.2
7 1998/01/13 19:28:32
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.2
8 1998/02/02 00:03:54
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1507,130 +1507,3 @@ double x;
}
#endif
/* !HAVE_CBRT */
#ifndef HAVE_ISINF
#if defined(aix)
#ifdef CLASS_CONFLICT
/* we want the math symbol */
#undef class
#endif
/* CLASS_CONFICT */
/* The gcc doesn't support isinf() (without libgcc?) so we
* have to do it - Gerhard Reitofer
*/
#ifdef __GNUC__
static
int
isinf
(
double
x
)
{
if
(
x
==
HUGE_VAL
)
return
(
1
);
if
(
x
==
-
HUGE_VAL
)
return
(
-
1
);
return
(
0
);
}
#else
/* __GNUC__ */
static
int
isinf
(
double
x
)
{
int
fpclass
=
class
(
x
);
if
(
fpclass
==
FP_PLUS_INF
)
return
(
1
);
if
(
fpclass
==
FP_MINUS_INF
)
return
(
-
1
);
return
(
0
);
}
#endif
/* __GNUC__ */
#endif
/* aix */
#if defined(ultrix4)
#include <fp_class.h>
static
int
isinf
(
x
)
double
x
;
{
int
fpclass
=
fp_class_d
(
x
);
if
(
fpclass
==
FP_POS_INF
)
return
(
1
);
if
(
fpclass
==
FP_NEG_INF
)
return
(
-
1
);
return
(
0
);
}
#endif
/* ultrix4 */
#if defined(alpha)
#include <fp_class.h>
static
int
isinf
(
x
)
double
x
;
{
int
fpclass
=
fp_class
(
x
);
if
(
fpclass
==
FP_POS_INF
)
return
(
1
);
if
(
fpclass
==
FP_NEG_INF
)
return
(
-
1
);
return
(
0
);
}
#endif
/* alpha */
#if defined(sparc_solaris) || defined(i386_solaris) || defined(svr4) || \
defined(sco)
#include <ieeefp.h>
static
int
isinf
(
d
)
double
d
;
{
fpclass_t
type
=
fpclass
(
d
);
switch
(
type
)
{
case
FP_SNAN
:
case
FP_QNAN
:
case
FP_NINF
:
case
FP_PINF
:
return
(
1
);
default:
break
;
}
return
(
0
);
}
#endif
/* sparc_solaris */
#if defined(irix5)
#include <ieeefp.h>
static
int
isinf
(
d
)
double
d
;
{
fpclass_t
type
=
fpclass
(
d
);
switch
(
type
)
{
case
FP_SNAN
:
case
FP_QNAN
:
case
FP_NINF
:
case
FP_PINF
:
return
(
1
);
default:
break
;
}
return
(
0
);
}
#endif
/* irix5 */
#endif
/* !HAVE_ISINF */
src/configure
View file @
e6e36408
This diff is collapsed.
Click to expand it.
src/configure.in
View file @
e6e36408
...
...
@@ -433,7 +433,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
AC_CHECK_HEADERS(sys/resource.h netdb.h arpa/inet.h)
AC_CHECK_HEADERS(readline.h history.h dld.h crypt.h endian.h float.h)
AC_CHECK_HEADERS(readline/history.h)
AC_CHECK_HEADERS(readline/history.h
ieeefp.h fp_class.h
)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
...
...
@@ -465,7 +465,8 @@ AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(tzset vfork memmove sigsetjmp kill sysconf)
AC_CHECK_FUNCS(tzset vfork memmove sigsetjmp kill sysconf fpclass)
AC_CHECK_FUNCS(fp_class fp_class_d class)
AC_CHECK_FUNCS(sigprocmask waitpid setsid fcvt)
AC_CHECK_FUNC(isinf,
AC_DEFINE(HAVE_ISINF),
...
...
src/include/config.h.in
View file @
e6e36408
...
...
@@ -14,6 +14,12 @@
* The following is set using configure.
*/
/* Set to 1 if you have <fp_class.h> */
#undef HAVE_FP_CLASS_H
/* Set to 1 if you have <ieeefp.h> */
#undef HAVE_IEEEFP_H
/* Set to 1 if you have <arpa/inet.h> */
#undef HAVE_ARPA_INET_H
...
...
@@ -53,6 +59,18 @@
/* Set to 1 if you have <dld.h> */
#undef HAVE_DLD_H
/* Set to 1 if you have fp_class() */
#undef HAVE_FP_CLASS
/* Set to 1 if you have class() */
#undef HAVE_CLASS
/* Set to 1 if you have fp_class_d() */
#undef HAVE_FP_CLASS_D
/* Set to 1 if you have fpclass() */
#undef HAVE_FPCLASS
/* Set to 1 if you have isinf() */
#undef HAVE_ISINF
#ifndef HAVE_ISINF
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment