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

Fixing compilation problems with Microsoft Visual Studio 2008. #10

Merged
merged 1 commit into from
Sep 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@

# unistd.h confilicts with ruby/win32.h when cross compiling for win32 and ruby 1.9.1
have_header 'unistd.h'
have_header 'inttypes.h'
have_header 'ruby/st.h' or have_header 'st.h' or abort "pg currently requires the ruby/st.h header"

checking_for "C99 variable length arrays" do
Expand Down
2 changes: 2 additions & 0 deletions ext/pg_binary_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

#include "pg.h"
#include "util.h"
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

VALUE rb_mPG_BinaryDecoder;

Expand Down
2 changes: 2 additions & 0 deletions ext/pg_binary_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

#include "pg.h"
#include "util.h"
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

VALUE rb_mPG_BinaryEncoder;

Expand Down
2 changes: 2 additions & 0 deletions ext/pg_text_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@

#include "pg.h"
#include "util.h"
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

VALUE rb_mPG_TextDecoder;
static ID s_id_decode;
Expand Down
2 changes: 2 additions & 0 deletions ext/pg_text_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

#include "pg.h"
#include "util.h"
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <math.h>

VALUE rb_mPG_TextEncoder;
Expand Down
12 changes: 6 additions & 6 deletions ext/pg_type_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ pg_typemap_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno
}

const struct pg_typemap_funcs pg_typemap_funcs = {
.fit_to_result = pg_typemap_fit_to_result,
.fit_to_query = pg_typemap_fit_to_query,
.fit_to_copy_get = pg_typemap_fit_to_copy_get,
.typecast_result_value = pg_typemap_result_value,
.typecast_query_param = pg_typemap_typecast_query_param,
.typecast_copy_get = pg_typemap_typecast_copy_get
pg_typemap_fit_to_result,
pg_typemap_fit_to_query,
pg_typemap_fit_to_copy_get,
pg_typemap_result_value,
pg_typemap_typecast_query_param,
pg_typemap_typecast_copy_get
};

static VALUE
Expand Down
12 changes: 6 additions & 6 deletions ext/pg_type_map_by_column.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ pg_tmbc_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, i
}

const struct pg_typemap_funcs pg_tmbc_funcs = {
.fit_to_result = pg_tmbc_fit_to_result,
.fit_to_query = pg_tmbc_fit_to_query,
.fit_to_copy_get = pg_tmbc_fit_to_copy_get,
.typecast_result_value = pg_tmbc_result_value,
.typecast_query_param = pg_tmbc_typecast_query_param,
.typecast_copy_get = pg_tmbc_typecast_copy_get
pg_tmbc_fit_to_result,
pg_tmbc_fit_to_query,
pg_tmbc_fit_to_copy_get,
pg_tmbc_result_value,
pg_tmbc_typecast_query_param,
pg_tmbc_typecast_copy_get
};

static void
Expand Down