Re: [PATCH]: proper usage of errno in mysql 4.0.11a
am 05.03.2003 13:47:58 von Arkadiusz MiskiewiczOn/Dnia Wed, Mar 05, 2003 at 12:57:22PM +0100, Sergei Golubchik wrote/napisa³(a)
> Applying...
Thanks.
> Sorry for this - mysql general list is high-traffic list and sometimes
> mail can slip unnoticed. For patches it's better use internals@ or bugs@
> (if it's a bugfix) lists that have much lower traffic.
No problem.
btw. what's the status of gcc 3.x support? Right now patch like
diff -urN mysql-4.0.10-gamma.org/isam/Makefile.am mysql-4.0.10-gamma/isam/Makefile.am
--- mysql-4.0.10-gamma.org/isam/Makefile.am Thu Feb 13 19:29:15 2003
+++ mysql-4.0.10-gamma/isam/Makefile.am Thu Feb 13 19:29:26 2003
@@ -16,7 +16,7 @@
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \
- ../dbug/libdbug.a ../strings/libmystrings.a
+ ../dbug/libdbug.a ../strings/libmystrings.a /usr/lib/libsupc++.la
pkglib_LIBRARIES = libnisam.a
bin_PROGRAMS = isamchk isamlog pack_isam
isamchk_DEPENDENCIES= $(LIBRARIES)
diff -urN mysql-4.0.10-gamma.org/myisam/Makefile.am mysql-4.0.10-gamma/myisam/Makefile.am
--- mysql-4.0.10-gamma.org/myisam/Makefile.am Wed Jan 29 12:29:22 2003
+++ mysql-4.0.10-gamma/myisam/Makefile.am Thu Feb 13 19:32:55 2003
@@ -19,7 +19,7 @@
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a ../mysys/libmysys.a \
- ../dbug/libdbug.a ../strings/libmystrings.a
+ ../dbug/libdbug.a ../strings/libmystrings.a /usr/lib/libsupc++.la
pkglib_LIBRARIES = libmyisam.a
bin_PROGRAMS = myisamchk myisamlog myisampack
myisamchk_DEPENDENCIES= $(LIBRARIES)
is required (note that we are no longer using gcc 2.95.x and this patch
breaks compilation with 2.95.x).
Also there was problem with my_inet_ntoa() not being linked and this
undefined reference...
diff -urN mysql-4.0.10-gamma.org/vio/viosocket.c mysql-4.0.10-gamma/vio/viosocket.c
--- mysql-4.0.10-gamma.org/vio/viosocket.c Thu Feb 13 18:28:22 2003
+++ mysql-4.0.10-gamma/vio/viosocket.c Thu Feb 13 18:28:35 2003
@@ -294,9 +294,9 @@
DBUG_PRINT("exit", ("getpeername gave error: %d", socket_errno));
DBUG_RETURN(1);
}
- my_inet_ntoa(vio->remote.sin_addr,buf);
+/* my_inet_ntoa(vio->remote.sin_addr,buf); */
}
- DBUG_PRINT("exit", ("addr: %s", buf));
+/* DBUG_PRINT("exit", ("addr: %s", buf)); */
DBUG_RETURN(0);
}
Another problem is that test programs were not linking with
libmysqlclient:
diff -urN mysql-4.0.9-gamma.org/acinclude.m4 mysql-4.0.9-gamma/acinclude.m4
--- mysql-4.0.9-gamma.org/acinclude.m4 Mon Feb 3 23:34:15 2003
+++ mysql-4.0.9-gamma/acinclude.m4 Tue Feb 4 00:11:55 2003
@@ -715,6 +715,9 @@
if test -f $d/libssl.a ; then
OPENSSL_LIB=$d
fi
+ if test -f $d/libssl.so ; then
+ OPENSSL_LIB=$d
+ fi
done
if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INCLUDE" ; then
diff -urN mysql-4.0.10-gamma.org/vio/Makefile.am mysql-4.0.10-gamma/vio/Makefile.am
--- mysql-4.0.10-gamma.org/vio/Makefile.am Wed Jan 29 12:29:24 2003
+++ mysql-4.0.10-gamma/vio/Makefile.am Wed Feb 12 01:50:02 2003
@@ -21,13 +21,13 @@
noinst_HEADERS =
test_ssl_SOURCES = test-ssl.c
test_ssl_LDADD = @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a ../mysys/libmysys.a \
- ../strings/libmystrings.a libvio.a $(openssl_libs)
+ ../strings/libmystrings.a libvio.a $(openssl_libs) ../libmysql_r/libmysqlclient_r.la
test_sslserver_SOURCES = test-sslserver.c
test_sslserver_LDADD = @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a ../mysys/libmysys.a \
- ../strings/libmystrings.a libvio.a $(openssl_libs)
+ ../strings/libmystrings.a libvio.a $(openssl_libs) ../libmysql_r/libmysqlclient_r.la
test_sslclient_SOURCES = test-sslclient.c
test_sslclient_LDADD = @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a ../mysys/libmysys.a \
- ../strings/libmystrings.a libvio.a $(openssl_libs)
+ ../strings/libmystrings.a libvio.a $(openssl_libs) ../libmysql_r/libmysqlclient_r.la
libvio_a_SOURCES = vio.c viosocket.c viossl.c viosslfactories.c
# Don't update the files from bitkeeper
Another problem with libwrap. c++ does strict checking of prototypes.
tcpd.h from tcp_wrappers wrappers package looks like this:
extern int hosts_access(); /* access control */
extern void sock_host(); /* look up endpoint addresses */
extern char *eval_client(); /* whatever is available */
so these arn't full prototypes. Patch that workarounds that:
diff -urN mysql-4.0.10-gamma.org/sql/mysqld.cc mysql-4.0.10-gamma/sql/mysqld.cc
--- mysql-4.0.10-gamma.org/sql/mysqld.cc Wed Jan 29 12:29:20 2003
+++ mysql-4.0.10-gamma/sql/mysqld.cc Wed Feb 12 02:04:17 2003
@@ -96,7 +96,13 @@
#endif /* __WIN__ */
#ifdef HAVE_LIBWRAP
+#define hosts_access hosts_access_old
+#define sock_host sock_host_old
+#define eval_client eval_client_old
#include
+#undef hosts_access
+#undef sock_host
+#undef eval_client
#include
#ifdef NEED_SYS_SYSLOG_H
#include
@@ -105,6 +111,9 @@
int deny_severity = LOG_WARNING;
#ifdef __STDC__
+extern int hosts_access(struct request_info *);
+extern int sock_host(struct request_info *);
+extern int eval_client(struct request_info *);
#define my_fromhost(A) fromhost(A)
#define my_hosts_access(A) hosts_access(A)
#define my_eval_client(A) eval_client(A)
> Regards,
> Sergei
--
Arkadiusz Mi¶kiewicz, Grupa BeeProvider - http://www.beep.pl/
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread13905@lists.mysql.com
To unsubscribe, e-mail