Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 14:57:38 von Lothar Behrens

Hi,

trying to get rid of my problems - earlier posting here - I get=20
compilation errors in the following file:

mac:~/psql-odbc-cvs/psqlodbc lothar$ make
make all-am
if /bin/sh ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I. -I. =
=20
-I/sw/include/postgresql -g -O2 -MT socket.lo -MD -MP -MF=20
".deps/socket.Tpo" -c -o socket.lo socket.c; \
then mv -f ".deps/socket.Tpo" ".deps/socket.Plo"; else rm -f=20
".deps/socket.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/sw/include/postgresql -g -O2 -MT=20
socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c -fno-common -DPIC=20
-o socket.lo
socket.c: In function `SOCK_wait_for_ready':
socket.c:260: error: storage size of `tm' isn't known
make[1]: *** [socket.lo] Error 1
make: *** [all] Error 2

My compiler on Mac OS X 10.3 is

gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is=20
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR=20
PURPOSE.

Any ideas ?

Thanks, Lothar

--
Lothar Behrens | Rapid Prototyping ...
Rosmarinstr 3 |=09
40235 Düsseldorf | www.lollisoft.de


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 16:08:36 von Tom Lane

Lothar Behrens writes:
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/sw/include/postgresql -g -O2 -MT
> socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c -fno-common -DPIC
> -o socket.lo
> socket.c: In function `SOCK_wait_for_ready':
> socket.c:260: error: storage size of `tm' isn't known

Perhaps that source file is missing an inclusion of or

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 16:23:30 von Hiroshi Saito

Ahhh,sorry...
It is fixed in the present CVS.

Please add config.h
#define TM_IN_SYS_TIME 1
However, define of config.h.in, then please run to configure once again.
/* Define to 1 if your declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

----- Original Message -----
From: "Tom Lane"


> Lothar Behrens writes:
> > gcc -DHAVE_CONFIG_H -I. -I. -I. -I/sw/include/postgresql -g -O2 -MT
> > socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c -fno-common -DPIC
> > -o socket.lo
> > socket.c: In function `SOCK_wait_for_ready':
> > socket.c:260: error: storage size of `tm' isn't known
>
> Perhaps that source file is missing an inclusion of or
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 17:23:08 von Lothar Behrens

Using #define TM_IN_SYS_TIME 1 didn't really helped. It was the missing=20
#include statement in socket.c.

But after all I get these error (./configure --with-unixodbc=20
--enable-unicode=3Dno):

gcc -r -keep_private_externs -nostdlib -o .libs/psqlodbc30w.so-master.o=20
info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo=20
environ.lo execute.lo lobj.lo win_md5.lo misc.lo options.lo pgtypes.lo=20
psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo=20
tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo=20
descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo && gcc -bundle=20
-o .libs/psqlodbc30w.so .libs/psqlodbc30w.so-master.o -L/sw/lib -lpq=20
-L/usr/local/lib -lodbcinst -lc
ld: .libs/psqlodbc30w.so-master.o illegal reference to symbol:=20
_SSL_read defined in indirectly referenced dynamic library=20
/usr/lib/libssl.0.9.7.dylib
ld: warning multiple definitions of symbol _EncryptMD5
..libs/psqlodbc30w.so-master.o definition of _EncryptMD5 in section=20
(__TEXT,__text)
/sw/lib/libpq.dylib(md5.o) definition of _EncryptMD5
ld: warning multiple definitions of symbol _md5_hash
..libs/psqlodbc30w.so-master.o definition of _md5_hash in section=20
(__TEXT,__text)
/sw/lib/libpq.dylib(md5.o) definition of _md5_hash
make[1]: *** [psqlodbc30w.la] Error 1
make: *** [all] Error 2

With or without unicode.

More ideas ?

Thanks, Lothar

Am 22.03.2006 um 16:23 schrieb Hiroshi Saito:

> Ahhh,sorry...
> It is fixed in the present CVS.
>
> Please add config.h
> #define TM_IN_SYS_TIME 1
> However, define of config.h.in, then please run to configure once=20
> again.
> /* Define to 1 if your declares `struct tm'. */
> /* #undef TM_IN_SYS_TIME */
>
> ----- Original Message -----
> From: "Tom Lane"
>
>
>> Lothar Behrens writes:
>>> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/sw/include/postgresql -g -O2 -MT
>>> socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c -fno-common -DPIC
>>> -o socket.lo
>>> socket.c: In function `SOCK_wait_for_ready':
>>> socket.c:260: error: storage size of `tm' isn't known
>>
>> Perhaps that source file is missing an inclusion of or=20
>>
>>
>> regards, tom lane
>>
>> ---------------------------(end of=20
>> broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo@postgresql.org so that=20
>> your
>> message can get through to the mailing list cleanly
>>
>>
>
>
>
--
Lothar Behrens | Rapid Prototyping ...
Rosmarinstr 3 |=09
40235 Düsseldorf | www.lollisoft.de



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 18:03:19 von Hiroshi Saito

From: "Lothar Behrens"

> Using #define TM_IN_SYS_TIME 1 didn't really helped. It was the missing
> #include statement in socket.c.

Uga, I have noticed the commit leak...
Thnaks, Fixed current CVS(07.03.0261)

>
> But after all I get these error (./configure --with-unixodbc
> --enable-unicode=no):

Umm, 07.03.026x is unicode only.

Regards,
Hiroshi Saito


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 22.03.2006 18:28:19 von Tom Lane

Lothar Behrens writes:
> gcc -r -keep_private_externs -nostdlib -o .libs/psqlodbc30w.so-master.o
> info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo
> environ.lo execute.lo lobj.lo win_md5.lo misc.lo options.lo pgtypes.lo
> psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo
> tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo
> descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo && gcc -bundle
> -o .libs/psqlodbc30w.so .libs/psqlodbc30w.so-master.o -L/sw/lib -lpq
> -L/usr/local/lib -lodbcinst -lc
> ld: .libs/psqlodbc30w.so-master.o illegal reference to symbol:
> _SSL_read defined in indirectly referenced dynamic library
> /usr/lib/libssl.0.9.7.dylib

I think Darwin's linker may insist on -lssl appearing in the link command.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 23.03.2006 09:17:29 von Lothar Behrens

Yes,

linking against ssl solved the SSL_read problem. But it didn't solved=20
the md5 functions problem.
I have prefixed them with psql_ and that helped.

I am not sure changing all references to these changes.

At the end, I get the same error as with the 07.03.200 driver version.
Also I didn't see any debug message, only log messages that didn't tell=20
me much :-(

I'll try more today...

Lothar

Here is a diff:

Index: config.h.in
==================== =====3D=
==================== =====3D=
=================3D
RCS file: /cvsroot/psqlodbc/psqlodbc/Attic/config.h.in,v
retrieving revision 1.2.2.5
diff -u -r1.2.2.5 config.h.in
--- config.h.in 15 Mar 2006 14:31:22 -0000 1.2.2.5
+++ config.h.in 23 Mar 2006 08:10:56 -0000
@@ -109,7 +109,7 @@
#undef WITH_UNIXODBC

/* Define to 1 if your declares `struct tm'. */
-#undef TM_IN_SYS_TIME
+#define TM_IN_SYS_TIME 1

/* Force define to 1 to build with unicode support */
#undef UNICODE_SUPPORT
Index: md5.c
==================== =====3D=
==================== =====3D=
=================3D
RCS file: /cvsroot/psqlodbc/psqlodbc/md5.c,v
retrieving revision 1.10.4.3
diff -u -r1.10.4.3 md5.c
--- md5.c 24 Jan 2006 12:03:42 -0000 1.10.4.3
+++ md5.c 23 Mar 2006 08:11:02 -0000
@@ -305,7 +305,7 @@
*
*/
bool
-md5_hash(const void *buff, size_t len, char *hexsum)
+psql_md5_hash(const void *buff, size_t len, char *hexsum)
{
uint8 sum[16];

@@ -328,7 +328,7 @@
* Returns TRUE if okay, FALSE on error (out of memory).
*/
bool
-EncryptMD5(const char *passwd, const char *salt, size_t salt_len,
+psql_EncryptMD5(const char *passwd, const char *salt, size_t salt_len,
char *buf)
{
size_t passwd_len =3D strlen(passwd);
@@ -343,7 +343,7 @@
memcpy(crypt_buf + passwd_len, salt, salt_len);

strcpy(buf, "md5");
- ret =3D md5_hash(crypt_buf, passwd_len + salt_len, buf + 3);
+ ret =3D psql_md5_hash(crypt_buf, passwd_len + salt_len, buf + 3);

pfree(crypt_buf);

Index: md5.h
==================== =====3D=
==================== =====3D=
=================3D
RCS file: /cvsroot/psqlodbc/psqlodbc/md5.h,v
retrieving revision 1.8.6.2
diff -u -r1.8.6.2 md5.h
--- md5.h 18 Jan 2006 09:52:15 -0000 1.8.6.2
+++ md5.h 23 Mar 2006 08:11:02 -0000
@@ -42,8 +42,8 @@
typedef unsigned int uint32; /* == 32 bits */
#endif /* not HAVE_UINT8 */

-extern bool md5_hash(const void *buff, size_t len, char *hexsum);
-extern bool EncryptMD5(const char *passwd, const char *salt,
+extern bool psql_md5_hash(const void *buff, size_t len, char *hexsum);
+extern bool psql_EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);

#endif



Am 22.03.2006 um 18:28 schrieb Tom Lane:

> Lothar Behrens writes:
>> gcc -r -keep_private_externs -nostdlib -o=20
>> .libs/psqlodbc30w.so-master.o
>> info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo
>> environ.lo execute.lo lobj.lo win_md5.lo misc.lo options.lo pgtypes.lo
>> psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo
>> tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo
>> descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo && gcc=20
>> -bundle
>> -o .libs/psqlodbc30w.so .libs/psqlodbc30w.so-master.o -L/sw/lib=20
>> -lpq
>> -L/usr/local/lib -lodbcinst -lc
>> ld: .libs/psqlodbc30w.so-master.o illegal reference to symbol:
>> _SSL_read defined in indirectly referenced dynamic library
>> /usr/lib/libssl.0.9.7.dylib
>
> I think Darwin's linker may insist on -lssl appearing in the link=20
> command.
>
> regards, tom lane
>
> ---------------------------(end of=20
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
--
Lothar Behrens | Rapid Prototyping ...
Rosmarinstr 3 |=09
40235 Düsseldorf | www.lollisoft.de



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 23.03.2006 10:31:26 von Lothar Behrens

I have it !

While going back until reading configuration from ini files, I=20
determined, that ODBC_INI is a file with that name: .odbc.ini
Copying my configuration to the right place solved the problem.

On Mac OS X, the ODBC setup application saves the user's configuration=20
in ~/Library/ODBC/odbc.ini where as the driver
searches it at ~/.odbc.ini.

My suggestion would be to distinuish between UNIX and Mac OS X by=20
another #define and on Mac first try ~/Library/ODBC/odbc.ini
in SQLGetPrivateProfileString, then ~/.odbc.ini.

Regards, Lothar

Am 23.03.2006 um 09:17 schrieb Lothar Behrens:

> Yes,
>
> linking against ssl solved the SSL_read problem. But it didn't solved=20
> the md5 functions problem.
> I have prefixed them with psql_ and that helped.
>
> I am not sure changing all references to these changes.
>
> At the end, I get the same error as with the 07.03.200 driver version.
> Also I didn't see any debug message, only log messages that didn't=20
> tell me much :-(
>
> I'll try more today...
>
> Lothar
>
> Here is a diff:
>
> Index: config.h.in
> ==================== =====
==================== =====3D=
==================
> RCS file: /cvsroot/psqlodbc/psqlodbc/Attic/config.h.in,v
> retrieving revision 1.2.2.5
> diff -u -r1.2.2.5 config.h.in
> --- config.h.in 15 Mar 2006 14:31:22 -0000 1.2.2.5
> +++ config.h.in 23 Mar 2006 08:10:56 -0000
> @@ -109,7 +109,7 @@
> #undef WITH_UNIXODBC
>
> /* Define to 1 if your declares `struct tm'. */
> -#undef TM_IN_SYS_TIME
> +#define TM_IN_SYS_TIME 1
>
> /* Force define to 1 to build with unicode support */
> #undef UNICODE_SUPPORT
> Index: md5.c
> ==================== =====
==================== =====3D=
==================
> RCS file: /cvsroot/psqlodbc/psqlodbc/md5.c,v
> retrieving revision 1.10.4.3
> diff -u -r1.10.4.3 md5.c
> --- md5.c 24 Jan 2006 12:03:42 -0000 1.10.4.3
> +++ md5.c 23 Mar 2006 08:11:02 -0000
> @@ -305,7 +305,7 @@
> *
> */
> bool
> -md5_hash(const void *buff, size_t len, char *hexsum)
> +psql_md5_hash(const void *buff, size_t len, char *hexsum)
> {
> uint8 sum[16];
>
> @@ -328,7 +328,7 @@
> * Returns TRUE if okay, FALSE on error (out of memory).
> */
> bool
> -EncryptMD5(const char *passwd, const char *salt, size_t salt_len,
> +psql_EncryptMD5(const char *passwd, const char *salt, size_t salt_len,
> char *buf)
> {
> size_t passwd_len =3D strlen(passwd);
> @@ -343,7 +343,7 @@
> memcpy(crypt_buf + passwd_len, salt, salt_len);
>
> strcpy(buf, "md5");
> - ret =3D md5_hash(crypt_buf, passwd_len + salt_len, buf + 3);
> + ret =3D psql_md5_hash(crypt_buf, passwd_len + salt_len, buf + 3);
>
> pfree(crypt_buf);
>
> Index: md5.h
> ==================== =====
==================== =====3D=
==================
> RCS file: /cvsroot/psqlodbc/psqlodbc/md5.h,v
> retrieving revision 1.8.6.2
> diff -u -r1.8.6.2 md5.h
> --- md5.h 18 Jan 2006 09:52:15 -0000 1.8.6.2
> +++ md5.h 23 Mar 2006 08:11:02 -0000
> @@ -42,8 +42,8 @@
> typedef unsigned int uint32; /* == 32 bits */
> #endif /* not HAVE_UINT8 */
>
> -extern bool md5_hash(const void *buff, size_t len, char *hexsum);
> -extern bool EncryptMD5(const char *passwd, const char *salt,
> +extern bool psql_md5_hash(const void *buff, size_t len, char *hexsum);
> +extern bool psql_EncryptMD5(const char *passwd, const char *salt,
> size_t salt_len, char *buf);
>
> #endif
>
>
>
> Am 22.03.2006 um 18:28 schrieb Tom Lane:
>
>> Lothar Behrens writes:
>>> gcc -r -keep_private_externs -nostdlib -o=20
>>> .libs/psqlodbc30w.so-master.o
>>> info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo
>>> environ.lo execute.lo lobj.lo win_md5.lo misc.lo options.lo=20
>>> pgtypes.lo
>>> psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo
>>> tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo
>>> descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo && gcc=20
>>> -bundle
>>> -o .libs/psqlodbc30w.so .libs/psqlodbc30w.so-master.o -L/sw/lib=20
>>> -lpq
>>> -L/usr/local/lib -lodbcinst -lc
>>> ld: .libs/psqlodbc30w.so-master.o illegal reference to symbol:
>>> _SSL_read defined in indirectly referenced dynamic library
>>> /usr/lib/libssl.0.9.7.dylib
>>
>> I think Darwin's linker may insist on -lssl appearing in the link=20
>> command.
>>
>> regards, tom lane
>>
>> ---------------------------(end of=20
>> broadcast)---------------------------
>> TIP 6: explain analyze is your friend
>>
>>
> --
> Lothar Behrens | Rapid Prototyping ...
> Rosmarinstr 3 |=09
> 40235 Düsseldorf | www.lollisoft.de
>
>
>
> ---------------------------(end of=20
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>
--
Lothar Behrens | Rapid Prototyping ...
Rosmarinstr 3 |=09
40235 Düsseldorf | www.lollisoft.de



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260

am 23.03.2006 11:05:52 von Lothar Behrens

On more note:

My last test was based on version 07.03.0200. I now also have tested=20
REL-07_03_ENHANCED.
There was only an installation problem, thus I simply copied the file.

I also determined some possible mismatch with driver installation.

Error in lbQuery: (SQLConnect()) 00000: 0 - [iODBC][Driver=20
Manager]dlcompat: file "/usr/local/lib/psqlodbc.so" not found
See [iODBC] !

I have compiled the driver with unixodbc. Also changing the psqlodbc.so=20
to psqlodbc30w.so (in ~/.odbc.ini) does not affect.
If I change using psqlodbc30w.so in ~/Library/ODBC/odbc.ini, it affect.

But strange: Regardless of the other configuration data in=20
~/Library/ODBC/odbc.ini, I only have access to my database, when
that file is additionally copied to ~/.odbc.ini.

Installing driver error:

mac:~/psql-odbc-cvs/psqlodbc lothar$ sudo make install
test -z "/usr/local/lib" || "/usr/local/lib"
/bin/sh: line 1: /usr/local/lib: is a directory
make[1]: *** [install-libLTLIBRARIES] Error 126
make: *** [install-am] Error 2

But at all least, the driver (REL-07_03_ENHANCED) seems to work=20
correctly in my GUI.

Regards, Lothar

Am 23.03.2006 um 10:31 schrieb Lothar Behrens:

> I have it !
>
> While going back until reading configuration from ini files, I=20
> determined, that ODBC_INI is a file with that name: .odbc.ini
> Copying my configuration to the right place solved the problem.
>
> On Mac OS X, the ODBC setup application saves the user's configuration=20
> in ~/Library/ODBC/odbc.ini where as the driver
> searches it at ~/.odbc.ini.
>
> My suggestion would be to distinuish between UNIX and Mac OS X by=20
> another #define and on Mac first try ~/Library/ODBC/odbc.ini
> in SQLGetPrivateProfileString, then ~/.odbc.ini.
>
> Regards, Lothar
>
> Am 23.03.2006 um 09:17 schrieb Lothar Behrens:
>
>> Yes,
>>
>> linking against ssl solved the SSL_read problem. But it didn't solved=20
>> the md5 functions problem.
>> I have prefixed them with psql_ and that helped.
>>
>> I am not sure changing all references to these changes.
>>
>> At the end, I get the same error as with the 07.03.200 driver version.
>> Also I didn't see any debug message, only log messages that didn't=20
>> tell me much :-(
>>
>> I'll try more today...
>>
>> Lothar
>>
>> Here is a diff:
>>
>> Index: config.h.in
>> ==================== =====
==================== =====3D=
==================
>> RCS file: /cvsroot/psqlodbc/psqlodbc/Attic/config.h.in,v
>> retrieving revision 1.2.2.5
>> diff -u -r1.2.2.5 config.h.in
>> --- config.h.in 15 Mar 2006 14:31:22 -0000 1.2.2.5
>> +++ config.h.in 23 Mar 2006 08:10:56 -0000
>> @@ -109,7 +109,7 @@
>> #undef WITH_UNIXODBC
>>
>> /* Define to 1 if your declares `struct tm'. */
>> -#undef TM_IN_SYS_TIME
>> +#define TM_IN_SYS_TIME 1
>>
>> /* Force define to 1 to build with unicode support */
>> #undef UNICODE_SUPPORT
>> Index: md5.c
>> ==================== =====
==================== =====3D=
==================
>> RCS file: /cvsroot/psqlodbc/psqlodbc/md5.c,v
>> retrieving revision 1.10.4.3
>> diff -u -r1.10.4.3 md5.c
>> --- md5.c 24 Jan 2006 12:03:42 -0000 1.10.4.3
>> +++ md5.c 23 Mar 2006 08:11:02 -0000
>> @@ -305,7 +305,7 @@
>> *
>> */
>> bool
>> -md5_hash(const void *buff, size_t len, char *hexsum)
>> +psql_md5_hash(const void *buff, size_t len, char *hexsum)
>> {
>> uint8 sum[16];
>>
>> @@ -328,7 +328,7 @@
>> * Returns TRUE if okay, FALSE on error (out of memory).
>> */
>> bool
>> -EncryptMD5(const char *passwd, const char *salt, size_t salt_len,
>> +psql_EncryptMD5(const char *passwd, const char *salt, size_t=20
>> salt_len,
>> char *buf)
>> {
>> size_t passwd_len =3D strlen(passwd);
>> @@ -343,7 +343,7 @@
>> memcpy(crypt_buf + passwd_len, salt, salt_len);
>>
>> strcpy(buf, "md5");
>> - ret =3D md5_hash(crypt_buf, passwd_len + salt_len, buf + 3);
>> + ret =3D psql_md5_hash(crypt_buf, passwd_len + salt_len, buf +=20
>> 3);
>>
>> pfree(crypt_buf);
>>
>> Index: md5.h
>> ==================== =====
==================== =====3D=
==================
>> RCS file: /cvsroot/psqlodbc/psqlodbc/md5.h,v
>> retrieving revision 1.8.6.2
>> diff -u -r1.8.6.2 md5.h
>> --- md5.h 18 Jan 2006 09:52:15 -0000 1.8.6.2
>> +++ md5.h 23 Mar 2006 08:11:02 -0000
>> @@ -42,8 +42,8 @@
>> typedef unsigned int uint32; /* == 32 bits */
>> #endif /* not HAVE_UINT8 */
>>
>> -extern bool md5_hash(const void *buff, size_t len, char *hexsum);
>> -extern bool EncryptMD5(const char *passwd, const char *salt,
>> +extern bool psql_md5_hash(const void *buff, size_t len, char=20
>> *hexsum);
>> +extern bool psql_EncryptMD5(const char *passwd, const char *salt,
>> size_t salt_len, char *buf);
>>
>> #endif
>>
>>
>>
>> Am 22.03.2006 um 18:28 schrieb Tom Lane:
>>
>>> Lothar Behrens writes:
>>>> gcc -r -keep_private_externs -nostdlib -o=20
>>>> .libs/psqlodbc30w.so-master.o
>>>> info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo
>>>> environ.lo execute.lo lobj.lo win_md5.lo misc.lo options.lo=20
>>>> pgtypes.lo
>>>> psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo
>>>> tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo
>>>> descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo && gcc=20
>>>> -bundle
>>>> -o .libs/psqlodbc30w.so .libs/psqlodbc30w.so-master.o -L/sw/lib=20
>>>> -lpq
>>>> -L/usr/local/lib -lodbcinst -lc
>>>> ld: .libs/psqlodbc30w.so-master.o illegal reference to symbol:
>>>> _SSL_read defined in indirectly referenced dynamic library
>>>> /usr/lib/libssl.0.9.7.dylib
>>>
>>> I think Darwin's linker may insist on -lssl appearing in the link=20
>>> command.
>>>
>>> regards, tom lane
>>>
>>> ---------------------------(end of=20
>>> broadcast)---------------------------
>>> TIP 6: explain analyze is your friend
>>>
>>>
>> --
>> Lothar Behrens | Rapid Prototyping ...
>> Rosmarinstr 3 |=09
>> 40235 Düsseldorf | www.lollisoft.de
>>
>>
>>
>> ---------------------------(end of=20
>> broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo@postgresql.org so that=20
>> your
>> message can get through to the mailing list cleanly
>>
>>
> --
> Lothar Behrens | Rapid Prototyping ...
> Rosmarinstr 3 |=09
> 40235 Düsseldorf | www.lollisoft.de
>
>
>
> ---------------------------(end of=20
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
--
Lothar Behrens | Rapid Prototyping ...
Rosmarinstr 3 |=09
40235 Düsseldorf | www.lollisoft.de



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster