summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bevin <gbevin@gentoo.org>2002-03-21 09:52:43 +0000
committerGeert Bevin <gbevin@gentoo.org>2002-03-21 09:52:43 +0000
commitc31c1db44a8b1dff577fd3531144a91b58120f4e (patch)
tree753197a5034603490a219a745c03a6a0f69205f7 /dev-libs/ibpp/files/ibpp-1.0.5.2.patch
parentnot gzipping html docs anymore (diff)
downloadgentoo-2-c31c1db44a8b1dff577fd3531144a91b58120f4e.tar.gz
gentoo-2-c31c1db44a8b1dff577fd3531144a91b58120f4e.tar.bz2
gentoo-2-c31c1db44a8b1dff577fd3531144a91b58120f4e.zip
Initial package release.
Diffstat (limited to 'dev-libs/ibpp/files/ibpp-1.0.5.2.patch')
-rw-r--r--dev-libs/ibpp/files/ibpp-1.0.5.2.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-libs/ibpp/files/ibpp-1.0.5.2.patch b/dev-libs/ibpp/files/ibpp-1.0.5.2.patch
new file mode 100644
index 000000000000..38b2647da57a
--- /dev/null
+++ b/dev-libs/ibpp/files/ibpp-1.0.5.2.patch
@@ -0,0 +1,73 @@
+diff -r -u ibpp-1-0-5-2_orig/database.cpp ibpp-1-0-5-2/database.cpp
+--- ibpp-1-0-5-2_orig/database.cpp 2001-11-10 13:52:58.000000000 +0100
++++ ibpp-1-0-5-2/database.cpp 2002-03-21 09:52:02.000000000 +0100
+@@ -354,9 +354,7 @@
+ throw ExceptionImpl("Database::Create", "Database is already connected.");
+ if (_DatabaseName == NULL)
+ throw ExceptionImpl("Database::Create", "Unspecified database name.");
+- if (_UserName == NULL)
+- throw ExceptionImpl("Database::Create", "Unspecified user name.");
+- if (_UserPassword == NULL)
++ if (_UserName != NULL && _UserPassword == NULL)
+ throw ExceptionImpl("Database::Create", "Unspecified user password.");
+
+ // Create a new database
+@@ -374,8 +372,11 @@
+ else connect[0] = '\0';
+ strcat(connect, _DatabaseName);
+
+- sprintf(create, "CREATE DATABASE \"%s\" USER \"%s\" PASSWORD \"%s\" ",
+- connect, _UserName, _UserPassword);
++ if (_UserName != NULL)
++ sprintf(create, "CREATE DATABASE \"%s\" USER \"%s\" PASSWORD \"%s\" ",
++ connect, _UserName, _UserPassword);
++ else
++ sprintf(create, "CREATE DATABASE \"%s\" ", connect);
+ if (_CreateParams != NULL)
+ {
+ strcat(create, " ");
+@@ -395,9 +396,7 @@
+ throw ExceptionImpl("Database::Connect", "Database is already connected.");
+ if (_DatabaseName == NULL)
+ throw ExceptionImpl("Database::Connect", "Unspecified database name.");
+- if (_UserName == NULL)
+- throw ExceptionImpl("Database::Connect", "Unspecified user name.");
+- if (_UserPassword == NULL)
++ if (_UserName != NULL && _UserPassword == NULL)
+ throw ExceptionImpl("Database::Connect", "Unspecified user password.");
+
+ // Attach to the database
+@@ -406,8 +405,8 @@
+ char connect[1024];
+
+ // Build a DPB based on the properties
+- dpb.Insert(isc_dpb_user_name, _UserName);
+- dpb.Insert(isc_dpb_password, _UserPassword);
++ if (_UserName != NULL) dpb.Insert(isc_dpb_user_name, _UserName);
++ if (_UserPassword != NULL) dpb.Insert(isc_dpb_password, _UserPassword);
+ dpb.Insert(isc_dpb_force_write, (short)0);
+ if (_RoleName != NULL) dpb.Insert(isc_dpb_sql_role_name, _RoleName);
+
+diff -r -u ibpp-1-0-5-2_orig/exception.cpp ibpp-1-0-5-2/exception.cpp
+--- ibpp-1-0-5-2_orig/exception.cpp 2001-11-10 13:52:58.000000000 +0100
++++ ibpp-1-0-5-2/exception.cpp 2002-03-21 09:52:28.000000000 +0100
+@@ -47,6 +47,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdarg.h>
+
+ using namespace ibpp_internals;
+
+diff -r -u ibpp-1-0-5-2_orig/tests/Makefile ibpp-1-0-5-2/tests/Makefile
+--- ibpp-1-0-5-2_orig/tests/Makefile 2001-06-08 18:26:34.000000000 +0200
++++ ibpp-1-0-5-2/tests/Makefile 2002-03-21 09:52:02.000000000 +0100
+@@ -52,7 +52,7 @@
+ #LIBS+=$(IBPPDIR)/$(TARGETDIR)/$(PLATFORM)/libibpp_core.a
+ #LIBS+=$(IBPPDIR)/$(TARGETDIR)/$(PLATFORM)/libibpp_helper.a
+
+- LIBS+=-lm -lcrypt -lgds
++ LIBS+=-lm -lcrypt -lgds -ldl
+
+ ifeq ($(TARGETDIR),release)
+ CXXFLAGS+= -O2