1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
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-22 10:34:07.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-22 10:34:07.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/_internals.h ibpp-1.0.5.2/_internals.h
--- ibpp-1.0.5.2_orig/_internals.h 2001-11-10 13:52:58.000000000 +0100
+++ ibpp-1.0.5.2/_internals.h 2002-03-22 10:33:07.000000000 +0100
@@ -832,7 +832,7 @@
// (((((((( OBJECT INTERNALS ))))))))
private:
- friend TransactionImpl;
+ friend class TransactionImpl;
isc_stmt_handle _Handle; // R�f�rence d'acc�s au statement InterBase API
diff -r -u ibpp-1.0.5.2_orig/Makefile ibpp-1.0.5.2/Makefile
--- ibpp-1.0.5.2_orig/Makefile 2001-06-08 18:26:30.000000000 +0200
+++ ibpp-1.0.5.2/Makefile 2002-03-22 10:34:07.000000000 +0100
@@ -147,7 +147,7 @@
release:
$(MAKE) DEBUG=0 BUILDDEPENDANCIES=1 targets
-targets: ctags
+targets:
# build targets
if [ ! -d $(TARGETDIR)/$(PLATFORM) ]; then mkdir -p $(TARGETDIR)/$(PLATFORM); fi
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-22 10:34:07.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
|