This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

R-2.14.2-1 and RODBC 1.3-5 package (W7)

I am using R 2.14.2-1 under cygwin 1.7.12-1 in Windows 7 Professional
Service Pack 1.
In the past I found very desirable to modify the RODBC package to
access the Windows ODBC connections in R under cygwin:

This enables NTLM authenticated connections to Oracle and sql server
databases using the Windows ODBC drivers.
I am considering to submit the corresponding patch request (see below)
to the RODBC 1.3-5 package maintainers.
The patch is pretty much an exact copy of an old patch present in
Before installing the package I also a need to define
ac_cv_search_SQLTables as specified below.

I am a novice using R and cygwin. Is there a way to patch
RODBC_1.3-5.tar so that ac_cv_search_SQLTables is automatically
defined when the package is installed under cygwin? Would it be better
to leave it undefined, and define it at the command prompt as
specified below? Maybe in that way people will still be able to use
libiodbc-devel library if they want to do so. Let me know if you have
any advice on how to proceed.
Thanks, Dario

Modify RODBC\src\RODBC.c in RODBC_1.3-5.tar as follows:
--- RODBC.c_bk  2012-03-08 22:01:02.000000000 -0800
+++ RODBC.c     2012-04-22 09:14:54.353868700 -0700
@@ -41,6 +41,12 @@
 #include <string.h>
 #include <limits.h> /* for INT_MAX */

+#ifdef __CYGWIN__
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32
 #define MAX_CHANNELS 1000
 #include <sql.h>
 #include <sqlext.h>

Installation procedure under Cygwin to access the windows ODBC DNSs:
export ac_cv_search_SQLTables="-lodbc32"
R CMD INSTALL RODBC_1.3-5.tar.gz

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]