Index: backend/Makefile.in
--- backend/Makefile.in.orig	2005-09-14 02:14:17 +0200
+++ backend/Makefile.in	2006-04-30 09:53:16 +0200
@@ -116,7 +116,7 @@
 
 papyrus_backend_SOURCES = backend.c $(libpapyrus_backend_la_SOURCES)
 papyrus_backend_LDFLAGS = -rdynamic @LDFLAGS@ @GLIB_CFLAGS@
-papyrus_backend_LDADD = -ldl 		      -L../common -lpapyrus_common 		      -L../equation -lpapyrus_equation 		      @GLIB_LIBS@ @LDFLAGS@ @PQ_LIBS@ 		      @MYSQL_LIBS@ @ORACLE_LIBS@ @LIBGDA_LIBS@
+papyrus_backend_LDADD = -L../common -lpapyrus_common 		      -L../equation -lpapyrus_equation 		      @GLIB_LIBS@ @LDFLAGS@ @PQ_LIBS@ 		      @MYSQL_LIBS@ @ORACLE_LIBS@ @LIBGDA_LIBS@
 
 
 libpapyrus_binding_pg_la_SOURCES = binding_pg.c
Index: backend/binding_gda.c
--- backend/binding_gda.c.orig	2004-03-16 04:52:22 +0100
+++ backend/binding_gda.c	2006-04-30 09:53:16 +0200
@@ -27,6 +27,7 @@
 	GdaCommand *command;
 	GdaConnection *conn = connection;
 	GdaDataModel *dm;
+	GError *error;
 
 	if (!conn) {
 		errormsg("Invalid connection");
@@ -42,7 +43,7 @@
 				  GDA_COMMAND_TYPE_SQL, 
 				  GDA_COMMAND_OPTION_STOP_ON_ERRORS);
 
-	dm = gda_connection_execute_single_command(conn, command, NULL);
+	dm = gda_connection_execute_single_command(conn, command, NULL, &error);
 
 	if (!dm) {
 		g_error("LibGda error returning data model from SQL query");
@@ -130,6 +131,21 @@
 	return (q->cur_record <= (pap_query_length(query) - 1));
 }
 
+static gint OLD_gda_data_model_get_column_position(GdaDataModel *model, gchar *field)
+{
+    const gchar *title;
+    gint fieldno;
+
+    for (fieldno = 0; fieldno < 100; fieldno++) {
+        title = gda_data_model_get_column_title(model, fieldno);
+        if (strcmp(title, field) == 0)
+            break;
+    }
+    if (fieldno == 100)
+        fieldno = 0;
+    return fieldno;
+}
+
 gchar *
 pap_query_get_value(void *query, gchar *field)
 {
@@ -148,7 +164,7 @@
 		return NULL;
 	}
 
-	fieldno = gda_data_model_get_column_position(q->res, field);
+	fieldno = OLD_gda_data_model_get_column_position(q->res, field);
 	if (fieldno == -1) {
 		errormsg("Invalid field: %s in query %s", field, q->string);
 		return NULL;
@@ -177,6 +193,7 @@
 	GdaConnection *conn;
 	GdaClient *client;
 	gchar *newconnectstr;
+    GError *error;
 
 	client = gda_client_new();
 	
@@ -187,7 +204,7 @@
 	conn = gda_client_open_connection_from_string(client,
 						      provider,
 						      newconnectstr,
-						      GDA_CONNECTION_OPTIONS_READ_ONLY);
+						      GDA_CONNECTION_OPTIONS_READ_ONLY, &error);
 
 	if (!GDA_IS_CONNECTION(conn)) {
 		g_error("Could not open connection from string `%s', using provider `%s'", 
Index: backend/convert.c
--- backend/convert.c.orig	2005-12-21 04:29:53 +0100
+++ backend/convert.c	2006-04-30 09:53:16 +0200
@@ -337,6 +337,9 @@
 	xmlNodePtr child;
 	char *old, *eq_str = NULL;
 	char *data;
+#ifndef INFINITY
+#define INFINITY 99999999
+#endif
 	double retval = INFINITY;
 
 	for (child = equation->children; child != NULL; child = child->next)
Index: equation/lexer.l
--- equation/lexer.l.orig	2005-09-14 02:14:18 +0200
+++ equation/lexer.l	2006-04-30 09:53:16 +0200
@@ -3,21 +3,18 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
-#include <bits/nan.h>
 
 #include "parser.h"
 
-double strtod(const char *nptr, char **endptr);
-
 %}
 
 %option noyywrap
 %option yylineno
 %%
-[0-9]*		{ eqnlval.d = strtod (eqntext, NULL); return NUMBER; }
-[0-9]*\.[0-9]+	{ eqnlval.d = strtod (eqntext, NULL); return NUMBER; }
-[0-9]+\.[0-9]*	{ eqnlval.d = strtod (eqntext, NULL); return NUMBER; }
-"NaN"		{ eqnlval.d = NAN; return NUMBER;}
+[0-9]*		{ eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; }
+[0-9]*\.[0-9]+	{ eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; }
+[0-9]+\.[0-9]*	{ eqnlval.d = (double)strtod (eqntext, NULL); return NUMBER; }
+"NaN"      { eqnlval.d = __builtin_nan(""); return NUMBER;}
 "lt"		{ return '<';}
 "gt"		{ return '>';}
 [a-zA-Z_]+	{ eqnlval.string = strdup (eqntext); return STRING; }
Index: html/xml2html.c
--- html/xml2html.c.orig	2005-11-23 02:34:13 +0100
+++ html/xml2html.c	2006-04-30 09:53:16 +0200
@@ -215,7 +215,8 @@
 		/* Calculate size of number. e.g. "123cm" would be 3 and
 		"12345cm" would be 5 */
 		for (i = 0; i < str_size && isdigit(size[i]); i++);
-		num_str = strndup(size, i);
+		num_str = strdup(size);
+		num_str[i] = '\0';
 
 		for (i = 0; i < atoi(size); i++) {
 			fputs("<BR>", output);
@@ -235,7 +236,8 @@
 		/* Calculate size of number. e.g. "123cm" would be 3 and
 		"12345cm" would be 5 */
 		for (i = 0; i < str_size && isdigit(size[i]); i++);
-		num_str = strndup(size, i);
+		num_str = strdup(size);
+		num_str[i] = '\0';
 
 		for (i = 0; i < atoi(size); i++) {
 			fputs("&nbsp;&nbsp;", output);
