Binary files orig/excel.link/src/.RCOMObject.cpp.swp and patched/excel.link/src/.RCOMObject.cpp.swp differ
diff -Nru orig/excel.link/src/COMError.cpp patched/excel.link/src/COMError.cpp
--- orig/excel.link/src/COMError.cpp	2023-05-06 02:11:34.000000000 +0200
+++ patched/excel.link/src/COMError.cpp	2024-02-05 15:30:41.882631900 +0100
@@ -58,9 +58,9 @@
 /* Parentheses added for FC4 with gcc4 and -D_FORTIFY_SOURCE=2 */
 #define PROBLEM			{char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
 #define MESSAGE                 {char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
-#define ERROR			),Rf_error(R_problem_buf);}
-#define RECOVER(x)		),Rf_error(R_problem_buf);}
-#define WARNING(x)		),Rf_warning(R_problem_buf);}
+#define ERROR			),Rf_error("%s", R_problem_buf);}
+#define RECOVER(x)		),Rf_error("%s", R_problem_buf);}
+#define WARNING(x)		),Rf_warning("%s", R_problem_buf);}
 #define LOCAL_EVALUATOR		/**/
 #define NULL_ENTRY		/**/
 #define WARN			WARNING(NULL)
diff -Nru orig/excel.link/src/RCOMObject.h patched/excel.link/src/RCOMObject.h
--- orig/excel.link/src/RCOMObject.h	2021-01-24 23:50:09.000000000 +0100
+++ patched/excel.link/src/RCOMObject.h	2024-02-05 15:42:19.734870400 +0100
@@ -43,13 +43,9 @@
 
 #undef ERROR
 
-extern "C" {
 #include <Rinternals.h>
-  //#include <Defn.h>
+//#include <Defn.h>
 #include <Rdefines.h>
-  extern void R_PreserveObject(SEXP);
-  extern void R_ReleaseObject(SEXP);
-}
 
 #ifdef length
 #undef length
diff -Nru orig/excel.link/src/RUtils.c patched/excel.link/src/RUtils.c
--- orig/excel.link/src/RUtils.c	2024-01-17 16:00:31.000000000 +0100
+++ patched/excel.link/src/RUtils.c	2024-02-05 15:32:48.344495400 +0100
@@ -53,9 +53,9 @@
 /* Parentheses added for FC4 with gcc4 and -D_FORTIFY_SOURCE=2 */
 #define PROBLEM			{char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
 #define MESSAGE                 {char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
-#define ERROR			),Rf_error(R_problem_buf);}
-#define RECOVER(x)		),Rf_error(R_problem_buf);}
-#define WARNING(x)		),Rf_warning(R_problem_buf);}
+#define ERROR			),Rf_error("%s", R_problem_buf);}
+#define RECOVER(x)		),Rf_error("%s", R_problem_buf);}
+#define WARNING(x)		),Rf_warning("%s", R_problem_buf);}
 #define LOCAL_EVALUATOR		/**/
 #define NULL_ENTRY		/**/
 #define WARN			WARNING(NULL)
diff -Nru orig/excel.link/src/connect.cpp patched/excel.link/src/connect.cpp
--- orig/excel.link/src/connect.cpp	2023-05-06 02:11:34.000000000 +0200
+++ patched/excel.link/src/connect.cpp	2024-02-05 15:42:46.988281200 +0100
@@ -30,11 +30,9 @@
 #endif
 
 
-extern "C" {
 #include "RUtils.h"
 #include <Rinternals.h>
 #include <Rdefines.h>
-}
 
 #include <R_ext/Error.h>	/* for Rf_error and Rf_warning */
 
@@ -77,9 +75,9 @@
 /* Parentheses added for FC4 with gcc4 and -D_FORTIFY_SOURCE=2 */
 #define PROBLEM			{char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
 #define MESSAGE                 {char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
-#define ERROR			),Rf_error(R_problem_buf);}
-#define RECOVER(x)		),Rf_error(R_problem_buf);}
-#define WARNING(x)		),Rf_warning(R_problem_buf);}
+#define ERROR			),Rf_error("%s", R_problem_buf);}
+#define RECOVER(x)		),Rf_error("%s", R_problem_buf);}
+#define WARNING(x)		),Rf_warning("%s", R_problem_buf);}
 #define LOCAL_EVALUATOR		/**/
 #define NULL_ENTRY		/**/
 #define WARN			WARNING(NULL)
diff -Nru orig/excel.link/src/converters.cpp patched/excel.link/src/converters.cpp
--- orig/excel.link/src/converters.cpp	2023-05-06 02:11:34.000000000 +0200
+++ patched/excel.link/src/converters.cpp	2024-02-05 15:33:14.248065300 +0100
@@ -67,9 +67,9 @@
 /* Parentheses added for FC4 with gcc4 and -D_FORTIFY_SOURCE=2 */
 #define PROBLEM			{char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
 #define MESSAGE                 {char R_problem_buf[R_PROBLEM_BUFSIZE];(snprintf)(R_problem_buf, R_PROBLEM_BUFSIZE,
-#define ERROR			),Rf_error(R_problem_buf);}
-#define RECOVER(x)		),Rf_error(R_problem_buf);}
-#define WARNING(x)		),Rf_warning(R_problem_buf);}
+#define ERROR			),Rf_error("%s", R_problem_buf);}
+#define RECOVER(x)		),Rf_error("%s", R_problem_buf);}
+#define WARNING(x)		),Rf_warning("%s", R_problem_buf);}
 #define LOCAL_EVALUATOR		/**/
 #define NULL_ENTRY		/**/
 #define WARN			WARNING(NULL)
