cleanup of cbrt() handling - Mailing list pgsql-patches

From Bruce Momjian
Subject cleanup of cbrt() handling
Date
Msg-id 200305250530.h4P5Ubp07906@candle.pha.pa.us
Whole thread Raw
Responses Re: cleanup of cbrt() handling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
This patch cleans up our static cbrt() implementation in float.c.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/utils/adt/float.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/adt/float.c,v
retrieving revision 1.87
diff -c -c -r1.87 float.c
*** src/backend/utils/adt/float.c    9 May 2003 21:19:49 -0000    1.87
--- src/backend/utils/adt/float.c    25 May 2003 05:28:58 -0000
***************
*** 70,93 ****
  #include "utils/builtins.h"


- #if !(NeXT && NX_CURRENT_COMPILER_RELEASE > NX_COMPILER_RELEASE_3_2)
-  /* NS3.3 has conflicting declarations of these in <math.h> */
-
- #ifndef atof
- extern double atof(const char *p);
- #endif
-
  #ifndef HAVE_CBRT
- #define cbrt my_cbrt
  static double cbrt(double x);
-
- #else
- #if !defined(nextstep)
- extern double cbrt(double x);
- #endif
  #endif   /* HAVE_CBRT */
- #endif   /* NeXT check */
-

  #ifndef M_PI
  /* from my RH5.2 gcc math.h file - thomas 2000-04-03 */
--- 70,78 ----
***************
*** 1983,1989 ****
  /* ========== PRIVATE ROUTINES ========== */

  #ifndef HAVE_CBRT
!
  static double
  cbrt(double x)
  {
--- 1968,1974 ----
  /* ========== PRIVATE ROUTINES ========== */

  #ifndef HAVE_CBRT
! /* I doubt this is still needed by any platform.  2003-05-25 */
  static double
  cbrt(double x)
  {

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: plpq for dblink
Next
From: Tom Lane
Date:
Subject: Re: cleanup of cbrt() handling