Skip to content

Commit

Permalink
Merge pull request #10 from PuzzleFlow/master
Browse files Browse the repository at this point in the history
Fixing compilation problems with Microsoft Visual Studio 2008.
  • Loading branch information
larskanis committed Sep 8, 2015
2 parents 5b770f3 + 9e10cec commit 3a71a8a
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
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

0 comments on commit 3a71a8a

Please sign in to comment.