From 97662dc30e5a9876a4256bfabb76b119a761382a Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Mon, 28 Jul 2003 07:28:55 +0000 Subject: [PATCH] Fix nameclash with NSAPI API --- ext/mysql/libmysql/libmysql.c | 8 ++++---- ext/mysql/libmysql/mysql_com.h | 2 +- ext/mysql/libmysql/net.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/mysql/libmysql/libmysql.c b/ext/mysql/libmysql/libmysql.c index 433de0380e..94d6352252 100644 --- a/ext/mysql/libmysql/libmysql.c +++ b/ext/mysql/libmysql/libmysql.c @@ -1510,7 +1510,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, /* without encryption? */ if (client_flag & CLIENT_SSL) { - if (my_net_write(net,buff,(uint) (2)) || net_flush(net)) + if (my_net_write(net,buff,(uint) (2)) || my_net_flush(net)) goto error; /* Do the SSL layering. */ DBUG_PRINT("info", ("IO layer change in progress...")); @@ -1543,7 +1543,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, mysql->db=my_strdup(db,MYF(MY_WME)); db=0; } - if (my_net_write(net,buff,(uint) (end-buff)) || net_flush(net) || + if (my_net_write(net,buff,(uint) (end-buff)) || my_net_flush(net) || net_safe_read(mysql) == packet_error) goto error; if (client_flag & CLIENT_COMPRESS) /* We will use compression */ @@ -1808,7 +1808,7 @@ send_file_to_server(MYSQL *mysql, const char *filename) mysql->net.last_errno=EE_FILENOTFOUND; sprintf(buf,EE(mysql->net.last_errno),tmp_name,errno); strmake(mysql->net.last_error,buf,sizeof(mysql->net.last_error)-1); - my_net_write(&mysql->net,"",0); net_flush(&mysql->net); + my_net_write(&mysql->net,"",0); my_net_flush(&mysql->net); my_free(tmp_name,MYF(0)); DBUG_RETURN(-1); } @@ -1827,7 +1827,7 @@ send_file_to_server(MYSQL *mysql, const char *filename) } (void) my_close(fd,MYF(0)); /* Send empty packet to mark end of file */ - if (my_net_write(&mysql->net,"",0) || net_flush(&mysql->net)) + if (my_net_write(&mysql->net,"",0) || my_net_flush(&mysql->net)) { mysql->net.last_errno=CR_SERVER_LOST; sprintf(mysql->net.last_error,ER(mysql->net.last_errno),socket_errno); diff --git a/ext/mysql/libmysql/mysql_com.h b/ext/mysql/libmysql/mysql_com.h index 75a07202c7..16bf1aa7ed 100644 --- a/ext/mysql/libmysql/mysql_com.h +++ b/ext/mysql/libmysql/mysql_com.h @@ -146,7 +146,7 @@ extern unsigned long net_buffer_length; int my_net_init(NET *net, Vio* vio); void net_end(NET *net); void net_clear(NET *net); -int net_flush(NET *net); +int my_net_flush(NET *net); int my_net_write(NET *net,const char *packet,unsigned long len); int net_write_command(NET *net,unsigned char command,const char *packet, unsigned long len); diff --git a/ext/mysql/libmysql/net.c b/ext/mysql/libmysql/net.c index 161fba4ace..3fd2f9d190 100644 --- a/ext/mysql/libmysql/net.c +++ b/ext/mysql/libmysql/net.c @@ -183,10 +183,10 @@ void net_clear(NET *net) /* Flush write_buffer if not empty. */ -int net_flush(NET *net) +int my_net_flush(NET *net) { int error=0; - DBUG_ENTER("net_flush"); + DBUG_ENTER("my_net_flush"); if (net->buff != net->write_pos) { error=net_real_write(net,(char*) net->buff, @@ -231,7 +231,7 @@ net_write_command(NET *net,uchar command,const char *packet,ulong len) buff[4]=command; if (net_write_buff(net,(char*) buff,5)) return 1; - return test(net_write_buff(net,packet,len) || net_flush(net)); + return test(net_write_buff(net,packet,len) || my_net_flush(net)); } -- 2.50.1