Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Yet another compile error regarding INFINITY #31

merged 1 commit into from

2 participants

dump.c: In function ‘dump_float’:
dump.c:423: error: ‘INFINITY’ undeclared (first use in this function)
dump.c:423: error: (Each undeclared identifier is reported only once
dump.c:423: error: for each function it appears in.

I had the result shown above trying to gem install oj on a Lenny-Box while on rvm-1.8.7-p352. I tried (as for now successfully) to apply the workaround in load.c to dump.c aswell. Maybe it'll help, as long as the tests (which I can't seem to run in a timely fashion due to the lack of rbenv on my system) didn't crash.



Thanks. I will pull your request. Glad you provided a fix as well as identifying a problem.

@ohler55 ohler55 merged commit e3f3258 into ohler55:master

Glad to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 3, 2012
  1. Possible math.h-Bug workaround

    Sebastian Georgi committed
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 ext/oj/dump.c
6 ext/oj/dump.c
@@ -43,6 +43,12 @@
#define rb_eEncodingError rb_eException
+#ifndef INFINITY
+#define INFINITY (1.0/0.0)
typedef unsigned long ulong;
typedef struct _Out {
Something went wrong with that request. Please try again.