Skip to content

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

@kinpoco

Description

@kinpoco

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions