diff -ru rpy2-2.7.4.orig/rpy/rinterface/na_values.c rpy2-2.7.4/rpy/rinterface/na_values.c
--- rpy2-2.7.4.orig/rpy/rinterface/na_values.c	2015-09-05 01:15:16.000000000 +0200
+++ rpy2-2.7.4/rpy/rinterface/na_values.c	2015-12-01 11:46:40.675932500 +0100
@@ -203,7 +203,7 @@
         0,                      /*tp_methods*/
         0,                      /*tp_members*/
         0,                      /*tp_getset*/
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 	NULL,
 #else	
         &PyLong_Type,           /*tp_base*/
@@ -401,7 +401,7 @@
         0, //NAInteger_methods,           /*tp_methods*/
         0,                      /*tp_members*/
         0,                      /*tp_getset*/
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 	NULL,
 #else
         &PyLong_Type,             /*tp_base*/
@@ -587,7 +587,7 @@
         0, //NAInteger_methods,           /*tp_methods*/
         0,                      /*tp_members*/
         0,                      /*tp_getset*/
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 	NULL,
 #else
         &PyFloat_Type,             /*tp_base*/
@@ -689,7 +689,7 @@
         0, //NAInteger_methods,           /*tp_methods*/
         0,                      /*tp_members*/
         0,                      /*tp_getset*/
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 	NULL,
 #elif (PY_VERSION_HEX < 0x03010000)
         &PyString_Type,             /*tp_base*/
@@ -856,7 +856,7 @@
         0, //NAInteger_methods,           /*tp_methods*/
         0,                      /*tp_members*/
         0,                      /*tp_getset*/
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 	NULL,
 #else
         &PyComplex_Type,             /*tp_base*/
diff -ru rpy2-2.7.4.orig/rpy/rinterface/_rinterface.c rpy2-2.7.4/rpy/rinterface/_rinterface.c
--- rpy2-2.7.4.orig/rpy/rinterface/_rinterface.c	2015-09-12 23:23:55.000000000 +0200
+++ rpy2-2.7.4/rpy/rinterface/_rinterface.c	2015-12-01 11:45:53.163820335 +0100
@@ -1162,7 +1162,7 @@
              "and R_runHandlers (on other platforms).");
 
 
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
 void win32CallBack()
 {
    /* called during i/o, eval, graphics in ProcessEvents */
@@ -3749,7 +3749,7 @@
   }
 
   /* NA types */
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
   NAInteger_Type.tp_base=&PyLong_Type;
 #endif
   if (PyType_Ready(&NAInteger_Type) < 0) {
@@ -3759,7 +3759,7 @@
     return NULL;
 #endif
   }
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
   NALogical_Type.tp_base=&PyLong_Type;
 #endif
   if (PyType_Ready(&NALogical_Type) < 0) {
@@ -3769,7 +3769,7 @@
     return NULL;
 #endif
   }
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
   NAReal_Type.tp_base=&PyFloat_Type;
 #endif
   if (PyType_Ready(&NAReal_Type) < 0) {
@@ -3779,7 +3779,7 @@
     return NULL;
 #endif
   }
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
   NAComplex_Type.tp_base=&PyComplex_Type;
 #endif
   if (PyType_Ready(&NAComplex_Type) < 0) {
diff -ru rpy2-2.7.4.orig/setup rpy2-2.7.4/setup.py
--- rpy2-2.7.4.orig/setup.py       2016-01-15 01:45:48.447894400 -0800
+++ rpy2-2.7.4/setup.py    2016-01-15 01:48:55.222874000 -0800
@@ -160,7 +160,7 @@
     extra_link_args = []
     extra_compile_args = []
     include_dirs = []
-    libraries = []
+    libraries = ['readline']
     library_dirs = []

     #FIXME: crude way (will break in many cases)
