Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with -ansi -std=iso9899:199409 #142

Closed
kinpoco opened this issue Jul 25, 2012 · 2 comments
Closed

Compilation error with -ansi -std=iso9899:199409 #142

kinpoco opened this issue Jul 25, 2012 · 2 comments

Comments

@kinpoco
Copy link

kinpoco commented Jul 25, 2012

Currently, ruby uses these two options for gcc : -ansi -std=iso9899:199409.
This leads to compilation error on AIX when compiling generator.c.
We can avoid this compilation error by reordering #include in fbuffer.h.
On AIX, we need to include ruby.h before standard include files to use some defines in ruby's config.h.

Could you please reorder #include in fbuffer.h like this?

diff --git a/ext/json/fbuffer/fbuffer.h b/ext/json/fbuffer/fbuffer.h
index f7c2b03..0c53296 100644
--- a/ext/json/fbuffer/fbuffer.h
+++ b/ext/json/fbuffer/fbuffer.h
@@ -2,8 +2,8 @@
#ifndef FBUFFER_H
#define FBUFFER_H

-#include <assert.h>
#include "ruby.h"
+#include <assert.h>

#ifdef HAVE_RUBY_ENCODING_H
#include "ruby/encoding.h"

@flori flori closed this as completed in baad45a Jul 25, 2012
@kinpoco
Copy link
Author

kinpoco commented Jul 25, 2012

Thank you very much for the prompt action!

@flori
Copy link
Owner

flori commented Jul 26, 2012

I just released version 1.7.4 that includes this fix.

jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
2012-07-26 (1.7.4)
  * Fix compilation problem on AIX, see flori/json#142
szuecs pushed a commit to szuecs/ruby that referenced this issue Dec 11, 2013
… [ruby-core:46744] [Bug ruby#6791].

This issue is fixed in upper stream as issue ruby#142. (flori/json#142)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlove pushed a commit to tenderlove/ruby that referenced this issue Jan 24, 2014
… [ruby-core:46744] [Bug ruby#6791].

This issue is fixed in upper stream as issue ruby#142. (flori/json#142)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
2012-07-26 (1.7.4)
  * Fix compilation problem on AIX, see flori/json#142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants