From 31086a6a9575b9c80f939089abafbde3bf6e1da2 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Wed, 23 May 2018 16:34:22 +0900 Subject: [PATCH] Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h before sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver. --- configure.ac | 1 + test/Makefile.in | 2 +- test/reset-db.c | 3 --- test/src/common.h | 2 ++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d7de0f2..f60a6e6 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,7 @@ AC_HEADER_TIME # unixODBC wants the following to get sane behavior for ODBCINT64 AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long int) # for unixODBC AC_CHECK_SIZEOF(void *) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(signed char) diff --git a/test/Makefile.in b/test/Makefile.in index 6aeab8f..3f9a9af 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -15,7 +15,7 @@ TESTNAMES = $(patsubst exe/%-test,%, $(TESTBINS)) # Set by autoconf LDFLAGS = @LDFLAGS@ CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ -I.. # config.h ODBC_CONFIG = @ODBC_CONFIG@ PROVE = @PROVE@ diff --git a/test/reset-db.c b/test/reset-db.c index 766f1a2..cd58726 100644 --- a/test/reset-db.c +++ b/test/reset-db.c @@ -15,9 +15,6 @@ #define snprintf _snprintf #endif -#include -#include - #include "src/common.h" SQLHENV env; diff --git a/test/src/common.h b/test/src/common.h index 0315f89..4794736 100644 --- a/test/src/common.h +++ b/test/src/common.h @@ -4,6 +4,8 @@ #ifdef WIN32 #include +#else +#include "config.h" #endif #include -- 2.39.5