aboutsummaryrefslogtreecommitdiffstats
path: root/main/ast_expr2.y
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-16 01:35:10 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-16 01:35:10 +0000
commit95af8fe8af74e9d98589457f7aa73be2ac91ee61 (patch)
treed92c4c33b7ab0b5c9559465c34058e1d530c97c1 /main/ast_expr2.y
parent35d5a377ed19d5ff658a6d3bd36d76f2b5b05a21 (diff)
Terry found this problem with running the expr2 parser on OSX. Make the #defines come out the same between the parser & lexer.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98953 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2.y')
-rw-r--r--main/ast_expr2.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/ast_expr2.y b/main/ast_expr2.y
index cb46aeb2b..7eba6d165 100644
--- a/main/ast_expr2.y
+++ b/main/ast_expr2.y
@@ -16,9 +16,19 @@
#include <stdio.h>
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#ifdef STANDALONE
+#ifndef __USE_ISOC99
+#define __USE_ISOC99 1
+#endif
+#endif
+#ifdef __USE_ISOC99
#define FP___PRINTF "%.18Lg"
#define FP___TYPE long double
+#else
+#define FP___PRINTF "%.16g"
+#define FP___TYPE double
+#endif
#ifdef HAVE_COSL
#define FUNC_COS cosl