Re: remove the unneeded header file math.h in binaryheap.c - Mailing list pgsql-hackers

From zengman
Subject Re: remove the unneeded header file math.h in binaryheap.c
Date
Msg-id tencent_14FE674B2DE33D2057AA47A9@qq.com
Whole thread Raw
In response to Re: remove the unneeded header file math.h in binaryheap.c  (Álvaro Herrera <alvherre@kurilemu.de>)
Responses Re: remove the unneeded header file math.h in binaryheap.c
List pgsql-hackers
Hi Álvaro Herrera,

I removed the <math.h> include from two files `dt_common.c` and `timestamp.c`, and the code compiles successfully in my
environment.
Would you consider adding this to the patch?

```
postgres@zxm-VMware-Virtual-Platform:~/code/postgres$ git diff
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index c4119ab7932..0e26ed67cb1 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -4,7 +4,6 @@
 
 #include <time.h>
 #include <ctype.h>
-#include <math.h>
 
 #include "common/string.h"
 #include "dt.h"
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 7cf433266f4..087725a44e7 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -5,7 +5,6 @@
 
 #include <time.h>
 #include <limits.h>
-#include <math.h>
 
 #ifdef __FAST_MATH__
 #error -ffast-math is known to break this code
```

--
Regards,
Man Zeng
www.openhalo.org

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Multixid SLRU truncation bugs at wraparound
Next
From: Andres Freund
Date:
Subject: Re: remove the unneeded header file math.h in binaryheap.c