diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-10 12:14:18 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-10 12:14:18 +0000 |
commit | f41c3bb80f1e498a9d27f6e236b0ff3a742764c9 (patch) | |
tree | d8a1c8d014710a1024b68b23b1a298dad93683b6 /source | |
parent | f59826c0c9ba283c25faeec2cbdc7e19cca7aa04 (diff) | |
download | samba-f41c3bb80f1e498a9d27f6e236b0ff3a742764c9.tar.gz samba-f41c3bb80f1e498a9d27f6e236b0ff3a742764c9.tar.xz samba-f41c3bb80f1e498a9d27f6e236b0ff3a742764c9.zip |
declare dbf in one spot
Diffstat (limited to 'source')
-rw-r--r-- | source/client/client.c | 1 | ||||
-rw-r--r-- | source/client/clitar.c | 1 | ||||
-rw-r--r-- | source/include/debug.h | 2 | ||||
-rw-r--r-- | source/include/includes.h | 2 | ||||
-rw-r--r-- | source/include/xfile.h | 4 | ||||
-rw-r--r-- | source/lib/cmd_interp.c | 1 | ||||
-rw-r--r-- | source/lib/readline.c | 1 | ||||
-rw-r--r-- | source/nmbd/nmbd.c | 1 | ||||
-rw-r--r-- | source/smbwrapper/smbsh.c | 1 | ||||
-rw-r--r-- | source/smbwrapper/smbw.c | 1 | ||||
-rw-r--r-- | source/torture/locktest.c | 1 | ||||
-rw-r--r-- | source/torture/locktest2.c | 1 | ||||
-rw-r--r-- | source/torture/masktest.c | 1 | ||||
-rw-r--r-- | source/torture/rpctorture.c | 1 | ||||
-rw-r--r-- | source/torture/torture.c | 1 | ||||
-rw-r--r-- | source/utils/smbcacls.c | 1 | ||||
-rw-r--r-- | source/utils/smbtree.c | 1 | ||||
-rw-r--r-- | source/utils/status.c | 1 | ||||
-rw-r--r-- | source/utils/testparm.c | 1 | ||||
-rw-r--r-- | source/utils/testprns.c | 1 | ||||
-rw-r--r-- | source/web/swat.c | 1 |
21 files changed, 7 insertions, 19 deletions
diff --git a/source/client/client.c b/source/client/client.c index c9842335a9f..72fa4bf87e9 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -2280,7 +2280,6 @@ static int do_message_op(void) fstring base_directory; char *pname = argv[0]; int opt; - extern XFILE *dbf; extern char *optarg; extern int optind; int old_debug; diff --git a/source/client/clitar.c b/source/client/clitar.c index 6169c9af460..49ea5edf479 100644 --- a/source/client/clitar.c +++ b/source/client/clitar.c @@ -71,7 +71,6 @@ stack dir_stack = {NULL, 0}; /* Want an empty stack */ #define SEPARATORS " \t\n\r" extern int DEBUGLEVEL; extern struct cli_state *cli; -extern XFILE *dbf; /* These defines are for the do_setrattr routine, to indicate * setting and reseting of file attributes in the function call */ diff --git a/source/include/debug.h b/source/include/debug.h index 0bde9e69cff..cad802d8ca3 100644 --- a/source/include/debug.h +++ b/source/include/debug.h @@ -40,6 +40,8 @@ int Debug1( char *, ... ) PRINTF_ATTRIBUTE(1,2); BOOL dbgtext( char *, ... ) PRINTF_ATTRIBUTE(1,2); +extern XFILE *dbf; + /* If we have these macros, we can add additional info to the header. */ #ifdef HAVE_FILE_MACRO #define FILE_MACRO (__FILE__) diff --git a/source/include/includes.h b/source/include/includes.h index 1f97a2d7ed9..8cb587209c8 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -626,6 +626,7 @@ extern int errno; #endif /* Lists, trees, caching, database... */ +#include "xfile.h" #include "ubi_sLinkList.h" #include "ubi_dLinkList.h" #include "dlinklist.h" @@ -640,7 +641,6 @@ extern int errno; #include "messages.h" #include "util_list.h" #include "charset.h" -#include "xfile.h" #include "util_getent.h" diff --git a/source/include/xfile.h b/source/include/xfile.h index 16390b49aa8..fa4752fe30b 100644 --- a/source/include/xfile.h +++ b/source/include/xfile.h @@ -19,6 +19,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef _XFILE_H_ +#define _XFILE_H_ /* see xfile.c for explanations */ @@ -42,3 +44,5 @@ extern XFILE *x_stdin, *x_stdout, *x_stderr; #define X_IONBF 2 #define x_getc(f) x_fgetc(f) + +#endif /* _XFILE_H_ */ diff --git a/source/lib/cmd_interp.c b/source/lib/cmd_interp.c index fed3d65d627..62e361408b8 100644 --- a/source/lib/cmd_interp.c +++ b/source/lib/cmd_interp.c @@ -917,7 +917,6 @@ static uint32 cmd_set(CLIENT_INFO *info, int argc, char *argv[]) BOOL interactive = True; char *cmd_str = NULL; int opt; - extern XFILE *dbf; extern char *optarg; static pstring servicesf = CONFIGFILE; pstring term_code; diff --git a/source/lib/readline.c b/source/lib/readline.c index b03d37695e5..76bc34f7759 100644 --- a/source/lib/readline.c +++ b/source/lib/readline.c @@ -49,7 +49,6 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void), int end)) { fd_set fds; - extern XFILE *dbf; static pstring line; struct timeval timeout; int fd = fileno(stdin); diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 141d0552813..d8d0aa46265 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -666,7 +666,6 @@ static void usage(char *pname) int main(int argc,char *argv[]) { int opt; - extern XFILE *dbf; extern char *optarg; extern BOOL append_log; diff --git a/source/smbwrapper/smbsh.c b/source/smbwrapper/smbsh.c index ce544004884..1a38b0dea88 100644 --- a/source/smbwrapper/smbsh.c +++ b/source/smbwrapper/smbsh.c @@ -42,7 +42,6 @@ int main(int argc, char *argv[]) int opt; extern char *optarg; extern int optind; - extern XFILE *dbf; dbf = x_stdout; smbw_setup_shared(); diff --git a/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c index 74a931587d9..38dd3c02c88 100644 --- a/source/smbwrapper/smbw.c +++ b/source/smbwrapper/smbw.c @@ -47,7 +47,6 @@ void smbw_init(void) extern BOOL in_client; static int initialised; static pstring servicesf = CONFIGFILE; - extern XFILE *dbf; char *p; int eno; pstring line; diff --git a/source/torture/locktest.c b/source/torture/locktest.c index bcae4fa9243..5ace2622aca 100644 --- a/source/torture/locktest.c +++ b/source/torture/locktest.c @@ -545,7 +545,6 @@ static void usage(void) char *share[NSERVERS]; extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *p; int seed, server; diff --git a/source/torture/locktest2.c b/source/torture/locktest2.c index 899310933fc..d0808da6381 100644 --- a/source/torture/locktest2.c +++ b/source/torture/locktest2.c @@ -533,7 +533,6 @@ static void usage(void) char *share1, *share2, *nfspath1, *nfspath2; extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *p; int seed; diff --git a/source/torture/masktest.c b/source/torture/masktest.c index 0e054b47031..06abf5f3f6e 100644 --- a/source/torture/masktest.c +++ b/source/torture/masktest.c @@ -420,7 +420,6 @@ static void usage(void) struct cli_state *cli; extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *p; int seed; diff --git a/source/torture/rpctorture.c b/source/torture/rpctorture.c index 5136a8e94b3..154d277641c 100644 --- a/source/torture/rpctorture.c +++ b/source/torture/rpctorture.c @@ -229,7 +229,6 @@ enum client_action { char *pname = argv[0]; int opt; - extern XFILE *dbf; extern char *optarg; extern int optind; static pstring servicesf = CONFIGFILE; diff --git a/source/torture/torture.c b/source/torture/torture.c index 292a4d61e07..11c09b2d416 100644 --- a/source/torture/torture.c +++ b/source/torture/torture.c @@ -3077,7 +3077,6 @@ static void usage(void) int gotpass = 0; extern char *optarg; extern int optind; - extern XFILE *dbf; static pstring servicesf = CONFIGFILE; BOOL correct = True; diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 59744a93159..914e99367bb 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -802,7 +802,6 @@ You can string acls together with spaces, commas or newlines\n\ pstring filename; extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *p; static pstring servicesf = CONFIGFILE; diff --git a/source/utils/smbtree.c b/source/utils/smbtree.c index 75390965b31..191a9124f77 100644 --- a/source/utils/smbtree.c +++ b/source/utils/smbtree.c @@ -325,7 +325,6 @@ static BOOL print_tree(struct user_auth_info *user_info) { extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *p; pstring servicesf = CONFIGFILE; diff --git a/source/utils/status.c b/source/utils/status.c index 7cbb1850de0..47379fd57cf 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -45,7 +45,6 @@ struct session_record{ } *srecs; extern int DEBUGLEVEL; -extern XFILE *dbf; static pstring Ucrit_username = ""; /* added by OH */ static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */ diff --git a/source/utils/testparm.c b/source/utils/testparm.c index e430fe414ba..1caf7925432 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -36,7 +36,6 @@ #include "smb.h" /* these live in util.c */ -extern XFILE *dbf; extern int DEBUGLEVEL; /*********************************************** diff --git a/source/utils/testprns.c b/source/utils/testprns.c index 6a5b35db3b5..df697a0ed1b 100644 --- a/source/utils/testprns.c +++ b/source/utils/testprns.c @@ -35,7 +35,6 @@ #include "smb.h" /* these live in util.c */ -extern XFILE *dbf; extern int DEBUGLEVEL; int main(int argc, char *argv[]) diff --git a/source/web/swat.c b/source/web/swat.c index 8551c5e907e..56ce321f8d8 100644 --- a/source/web/swat.c +++ b/source/web/swat.c @@ -999,7 +999,6 @@ static void printers_page(void) { extern char *optarg; extern int optind; - extern XFILE *dbf; int opt; char *page; |