Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
504ccad1
Commit
504ccad1
authored
Jul 06, 2016
by
antirez
Browse files
Fix definition of M_PI in geohash_helper.c.
Without the right feature macros M_PI is not defined in math.h.
parent
eaa713e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/geohash_helper.c
View file @
504ccad1
...
@@ -34,7 +34,9 @@
...
@@ -34,7 +34,9 @@
* https://github.com/yinqiwen/ardb/blob/d42503/src/geo/geohash_helper.cpp
* https://github.com/yinqiwen/ardb/blob/d42503/src/geo/geohash_helper.cpp
*/
*/
#include "fmacros.h"
#include "geohash_helper.h"
#include "geohash_helper.h"
#include <math.h>
#define D_R (M_PI / 180.0)
#define D_R (M_PI / 180.0)
#define R_MAJOR 6378137.0
#define R_MAJOR 6378137.0
...
...
src/geohash_helper.h
View file @
504ccad1
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#ifndef GEOHASH_HELPER_HPP_
#ifndef GEOHASH_HELPER_HPP_
#define GEOHASH_HELPER_HPP_
#define GEOHASH_HELPER_HPP_
#include <math.h>
#include "geohash.h"
#include "geohash.h"
#define GZERO(s) s.bits = s.step = 0;
#define GZERO(s) s.bits = s.step = 0;
...
...
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