diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-07-29 03:08:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-07-29 03:08:05 +0000 |
commit | 64578c0589a3a741f81fb55c16eeb882128da00b (patch) | |
tree | 8b650156e44e4d39af8625185d857a88789b8074 /source3/client | |
parent | c48b3fce6be6d5d952cbcda0ddae223dda5a576f (diff) | |
download | samba-64578c0589a3a741f81fb55c16eeb882128da00b.tar.gz samba-64578c0589a3a741f81fb55c16eeb882128da00b.tar.bz2 samba-64578c0589a3a741f81fb55c16eeb882128da00b.zip |
merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 70 | ||||
-rw-r--r-- | source3/client/clientutil.c | 10 | ||||
-rw-r--r-- | source3/client/ntclient.c | 4 | ||||
-rw-r--r-- | source3/client/smbmount.c | 62 |
4 files changed, 9 insertions, 137 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index bdfa29f86b..b72a620730 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -19,9 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif +#define NO_SYSLOG #include "includes.h" @@ -2919,14 +2917,6 @@ try and browse available connections on a host ****************************************************************************/ static BOOL browse_host(BOOL sort) { -#ifdef NOSTRCASECMP -/* If strcasecmp is already defined, remove it. */ -#ifdef strcasecmp -#undef strcasecmp -#endif /* strcasecmp */ -#define strcasecmp StrCaseCmp -#endif /* NOSTRCASECMP */ - char *rparam = NULL; char *rdata = NULL; char *p; @@ -3313,61 +3303,25 @@ void cmd_help(char *dum_in, char *dum_out) /**************************************************************************** wait for keyboard activity, swallowing network packets ****************************************************************************/ -#ifdef CLIX -static char wait_keyboard(char *buffer) -#else static void wait_keyboard(char *buffer) -#endif { fd_set fds; int selrtn; struct timeval timeout; -#ifdef CLIX - int delay = 0; -#endif - while (1) { extern int Client; FD_ZERO(&fds); FD_SET(Client,&fds); -#ifndef CLIX FD_SET(fileno(stdin),&fds); -#endif timeout.tv_sec = 20; timeout.tv_usec = 0; -#ifdef CLIX - timeout.tv_sec = 0; -#endif selrtn = sys_select(&fds,&timeout); -#ifndef CLIX if (FD_ISSET(fileno(stdin),&fds)) return; -#else - { - char ch; - int readret; - - set_blocking(fileno(stdin), False); - readret = read_data( fileno(stdin), &ch, 1); - set_blocking(fileno(stdin), True); - if (readret == -1) - { - if (errno != EAGAIN) - { - /* should crash here */ - DEBUG(1,("readchar stdin failed\n")); - } - } - else if (readret != 0) - { - return ch; - } - } -#endif /* We deliberately use receive_smb instead of client_receive_smb as we want to receive @@ -3376,16 +3330,7 @@ static void wait_keyboard(char *buffer) if (FD_ISSET(Client,&fds)) receive_smb(Client,buffer,0); -#ifdef CLIX - delay++; - if (delay > 100000) - { - delay = 0; - chkpath("\\",False); - } -#else chkpath("\\",False); -#endif } } @@ -3460,22 +3405,11 @@ static BOOL process(char *base_directory) DEBUG(0,("smb: %s> ", CNV_LANG(cur_dir))); fflush(dbf); -#ifdef CLIX - line[0] = wait_keyboard(InBuffer); - /* this might not be such a good idea... */ - if ( line[0] == EOF) - break; -#else wait_keyboard(InBuffer); -#endif /* and get a response */ -#ifdef CLIX - fgets( &line[1],999, stdin); -#else if (!fgets(line,1000,stdin)) break; -#endif /* input language code to internal one */ CNV_INPUT (line); @@ -3588,7 +3522,7 @@ static void usage(char *pname) interpret_coding_system(term_code); -#ifdef USE_SSL +#ifdef WITH_SSL sslutil_init(0); #endif diff --git a/source3/client/clientutil.c b/source3/client/clientutil.c index e63f668481..da5ea531d2 100644 --- a/source3/client/clientutil.c +++ b/source3/client/clientutil.c @@ -19,9 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif +#define NO_SYSLOG #include "includes.h" @@ -338,9 +336,9 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf) _smb_setlen(outbuf,len); CVAL(outbuf,0) = 0x81; -#ifdef USE_SSL +#ifdef WITH_SSL retry: -#endif /* USE_SSL */ +#endif /* WITH_SSL */ send_smb(Client,outbuf); DEBUG(5,("Sent session request\n")); @@ -377,7 +375,7 @@ retry: return cli_send_session_request(inbuf,outbuf); } /* C. Hoch 9/14/95 End */ -#ifdef USE_SSL +#ifdef WITH_SSL if(CVAL(inbuf,0) == 0x83 && CVAL(inbuf,4) == 0x8e) { /* use ssl */ fprintf(stderr, "Making secure connection\n"); if(!sslutil_fd_is_ssl(Client)){ diff --git a/source3/client/ntclient.c b/source3/client/ntclient.c index 92d74e1d49..cb2f6ecf1a 100644 --- a/source3/client/ntclient.c +++ b/source3/client/ntclient.c @@ -20,9 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif +#define NO_SYSLOG #include "includes.h" diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 505552997b..2424513d68 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -19,9 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef SYSLOG -#undef SYSLOG -#endif +#define NO_SYSLOG #include <linux/version.h> #define LVERSION(major,minor,patch) (((((major)<<8)+(minor))<<8)+(patch)) @@ -295,7 +293,7 @@ send_fs_socket(char *mount_point, char *inbuf, char *outbuf) /* * Wait for a signal from smbfs ... */ - signal(SIGUSR1, &usr1_handler); + CatchSignal(SIGUSR1, &usr1_handler); pause(); DEBUG(0, ("smbmount: got signal, getting new socket\n")); @@ -450,61 +448,25 @@ void cmd_help(char *dum_in, char *dum_out) /**************************************************************************** wait for keyboard activity, swallowing network packets ****************************************************************************/ -#ifdef CLIX -static char wait_keyboard(char *buffer) -#else static void wait_keyboard(char *buffer) -#endif { fd_set fds; int selrtn; struct timeval timeout; -#ifdef CLIX - int delay = 0; -#endif - while (1) { extern int Client; FD_ZERO(&fds); FD_SET(Client,&fds); -#ifndef CLIX FD_SET(fileno(stdin),&fds); -#endif timeout.tv_sec = 20; timeout.tv_usec = 0; -#ifdef CLIX - timeout.tv_sec = 0; -#endif selrtn = sys_select(&fds,&timeout); -#ifndef CLIX if (FD_ISSET(fileno(stdin),&fds)) return; -#else - { - char ch; - int readret; - - set_blocking(fileno(stdin), False); - readret = read_data( fileno(stdin), &ch, 1); - set_blocking(fileno(stdin), True); - if (readret == -1) - { - if (errno != EAGAIN) - { - /* should crash here */ - DEBUG(1,("readchar stdin failed\n")); - } - } - else if (readret != 0) - { - return ch; - } - } -#endif /* We deliberately use receive_smb instead of client_receive_smb as we want to receive @@ -513,16 +475,7 @@ static void wait_keyboard(char *buffer) if (FD_ISSET(Client,&fds)) receive_smb(Client,buffer,0); -#ifdef CLIX - delay++; - if (delay > 100000) - { - delay = 0; - chkpath("\\",False); - } -#else chkpath("\\",False); -#endif } } @@ -595,22 +548,11 @@ static BOOL process(char *base_directory) DEBUG(0,("smb: %s> ", CNV_LANG(cur_dir))); fflush(dbf); -#ifdef CLIX - line[0] = wait_keyboard(InBuffer); - /* this might not be such a good idea... */ - if ( line[0] == EOF) - break; -#else wait_keyboard(InBuffer); -#endif /* and get a response */ -#ifdef CLIX - fgets( &line[1],999, stdin); -#else if (!fgets(line,1000,stdin)) break; -#endif /* input language code to internal one */ CNV_INPUT (line); |