From 7a3b56ef466722b7505ca87aed231db6cbe042c4 Mon Sep 17 00:00:00 2001 From: brodsom Date: Sat, 1 Mar 2003 17:51:59 +0000 Subject: [PATCH] Use the same ifdef for function declarations and definitions. (found with gcc never defined warnings) --- src/remote/inet.cpp | 13 ++++++++++--- src/remote/protocol.cpp | 5 ++++- src/remote/wnet.cpp | 2 ++ src/remote/xnet.cpp | 2 ++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 1d5f7d5e1b..a941a5dbe5 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -41,7 +41,7 @@ * */ /* -$Id: inet.cpp,v 1.54 2003-02-18 16:06:01 bellardo Exp $ +$Id: inet.cpp,v 1.55 2003-03-01 17:51:59 brodsom Exp $ */ #include "firebird.h" #include "../jrd/ib_stdio.h" @@ -326,12 +326,14 @@ static void alarm_handler(int); static PORT alloc_port(PORT); static PORT aux_connect(PORT, PACKET *, XDR_INT(*)(void)); static PORT aux_request(PORT, PACKET *); +#if !defined(WIN_NT) #ifndef VMS static int check_host(PORT, TEXT *, TEXT *, struct passwd *); #else static int check_host(PORT, TEXT *, TEXT *); #endif static BOOLEAN check_proxy(PORT, TEXT *, TEXT *); +#endif static void cleanup_port(PORT); static void disconnect(PORT); static void exit_handler(void *); @@ -355,7 +357,9 @@ static void inet_gen_error(PORT, STATUS, ...); static bool_t inet_getbytes(XDR *, SCHAR *, u_int); static bool_t inet_getlong(XDR *, SLONG *); static u_int inet_getpostn(XDR *); +#if !(defined WIN_NT) static void inet_handler(PORT); +#endif static caddr_t inet_inline(XDR *, u_int); static int inet_error(PORT, const TEXT *, STATUS, int); static bool_t inet_putlong(XDR *, SLONG *); @@ -373,8 +377,10 @@ static PORT inet_try_connect( PACKET*, static bool_t inet_write(XDR *, int); static void inet_zero(SCHAR *, int); static int initWSA(PORT); +#if !(defined WIN_NT) static int parse_hosts(TEXT *, TEXT *, TEXT *); static int parse_line(TEXT *, TEXT *, TEXT *, TEXT *); +#endif #ifdef DEBUG static void packet_print(TEXT *, UCHAR *, int, int); @@ -1758,6 +1764,7 @@ static PORT aux_request( PORT port, PACKET * packet) return new_port; } +#ifndef WIN_NT #ifdef VMS static check_host( PORT port, TEXT * host_name, TEXT * user_name) { @@ -1790,9 +1797,8 @@ static check_host( PORT port, TEXT * host_name, TEXT * user_name) return result; } -#endif +#else -#if !(defined VMS || defined WIN_NT) static int check_host( PORT port, TEXT * host_name, @@ -1854,6 +1860,7 @@ static int check_host( return result; } #endif +#endif #if !(defined WIN_NT) static BOOLEAN check_proxy( PORT port, TEXT * host_name, TEXT * user_name) diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp index b3fb010728..920b3fe74e 100644 --- a/src/remote/protocol.cpp +++ b/src/remote/protocol.cpp @@ -69,14 +69,17 @@ static void free_cstring(XDR *, CSTRING *); static RSR get_statement(XDR *, SSHORT); static bool_t xdr_cstring(XDR *, CSTRING *); static bool_t xdr_datum(XDR *, DSC *, BLOB_PTR *); +#ifdef DEBUG_XDR_MEMORY static bool_t xdr_debug_packet(XDR *, enum xdr_op, PACKET *); - +#endif static bool_t xdr_longs(XDR *, CSTRING *); static bool_t xdr_message(XDR *, REM_MSG, FMT); static bool_t xdr_quad(XDR *, struct bid *); static bool_t xdr_request(XDR *, USHORT, USHORT, USHORT); +#ifdef VMS static bool_t xdr_semi_opaque(XDR *, REM_MSG, FMT); static bool_t xdr_semi_opaque_slice(XDR *, LSTRING *); +#endif static bool_t xdr_slice(XDR *, LSTRING *, USHORT, BLOB_PTR *); static bool_t xdr_status_vector(XDR *, STATUS *, TEXT * strings[]); static bool_t xdr_sql_blr(XDR *, SLONG, CSTRING *, int, SQL_STMT_TYPE); diff --git a/src/remote/wnet.cpp b/src/remote/wnet.cpp index a254d69828..a26828842e 100644 --- a/src/remote/wnet.cpp +++ b/src/remote/wnet.cpp @@ -101,7 +101,9 @@ static bool_t wnet_putbytes(XDR *, SCHAR *, u_int); static bool_t wnet_read(XDR *); static bool_t wnet_setpostn(XDR *, u_int); static bool_t wnet_write(XDR *, int); +#ifdef DEBUG static void packet_print(TEXT *, UCHAR *, int); +#endif static int packet_receive(PORT, UCHAR *, SSHORT, SSHORT *); static int packet_send(PORT, SCHAR *, SSHORT); static void wnet_copy(SCHAR *, SCHAR *, int); diff --git a/src/remote/xnet.cpp b/src/remote/xnet.cpp index 736a94fc14..b131e27883 100644 --- a/src/remote/xnet.cpp +++ b/src/remote/xnet.cpp @@ -97,7 +97,9 @@ static int accept_connection(PORT, P_CNCT *); static PORT alloc_port(PORT, UCHAR *, USHORT, UCHAR *, ULONG); static PORT aux_connect(PORT, PACKET *, XDR_INT(*)(void)); static PORT aux_request(PORT, PACKET *); +#ifdef UNIX static ULONG connection_setup(TEXT *, PACKET *, STATUS *); +#endif static void cleanup_comm(XCC); static void cleanup_port(PORT); static void disconnect(PORT);