declare dbf in one spot
authorAndrew Tridgell <tridge@samba.org>
Mon, 10 Sep 2001 12:14:18 +0000 (12:14 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 10 Sep 2001 12:14:18 +0000 (12:14 +0000)
(This used to be commit f41c3bb80f1e498a9d27f6e236b0ff3a742764c9)

21 files changed:
source3/client/client.c
source3/client/clitar.c
source3/include/debug.h
source3/include/includes.h
source3/include/xfile.h
source3/lib/cmd_interp.c
source3/lib/readline.c
source3/nmbd/nmbd.c
source3/smbwrapper/smbsh.c
source3/smbwrapper/smbw.c
source3/torture/locktest.c
source3/torture/locktest2.c
source3/torture/masktest.c
source3/torture/rpctorture.c
source3/torture/torture.c
source3/utils/smbcacls.c
source3/utils/smbtree.c
source3/utils/status.c
source3/utils/testparm.c
source3/utils/testprns.c
source3/web/swat.c

index c9842335a9f98fa17bc82eecd7579932e80fc52a..72fa4bf87e9a82191720a5ddda7f607a2a35ac92 100644 (file)
@@ -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;
index 6169c9af4606004f7341647e56011665aa7a008d..49ea5edf479b8f3b61567c66974636870b0de1e0 100644 (file)
@@ -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 */
index 0bde9e69cff390a070f97b2b5e4a44ecf98a2c0a..cad802d8ca33720ca2c91a3618c374f76b23fd1a 100644 (file)
@@ -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__)
index 1f97a2d7ed9903e24c27372cf2f12a743f254a12..8cb587209c85b2303f3b0227da6f963aee792336 100644 (file)
@@ -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"
 
index 16390b49aa8cc8418412e86ab7bb81d0c0a868a0..fa4752fe30be7ad3f70c4081962e06e04add5376 100644 (file)
@@ -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_ */
index fed3d65d6277deae8c3ad9674392518e2fb326db..62e361408b8457eb99fede0c077f089e6ab7b983 100644 (file)
@@ -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;
index b03d37695e58635be4fa0765ee6136959f29498e..76bc34f77594ce08905b4517e3cb160ea6c92674 100644 (file)
@@ -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);
index 141d055281392fb5553c8a3c69f80a7d89d503fa..d8d0aa46265761c66bbe8d5fcdaab44f2bf5c753 100644 (file)
@@ -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;
 
index ce5440048845b1939560c8af4b3885ca6ded0ed9..1a38b0dea882fb063123391e3e2085cbe81e13a7 100644 (file)
@@ -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();
index 74a931587d9090f10d477f0014b8a82936302e0e..38dd3c02c880b775fe999d2e71a3444b25721bcb 100644 (file)
@@ -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;
index bcae4fa924325a16f67f16ae6b9140283e6cd8b6..5ace2622aca8f8974a8f9a526eba87601c0ecb3f 100644 (file)
@@ -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;
index 899310933fc4453697ce62992182ad40d3708b1d..d0808da638110176afa2203e5e1216c1f18db05b 100644 (file)
@@ -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;
index 0e054b470315e8bf3fe9d7875242a3888d15719a..06abf5f3f6ec831b25e91471b4c41166332f399c 100644 (file)
@@ -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;
index 5136a8e94b3e74da5a80c57c3c872559fe5286ed..154d277641c793db1e3c47c4ec88f6319d0f3761 100644 (file)
@@ -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;
index 292a4d61e07000ca407d357213abe31e700d3224..11c09b2d4164dae9d3e071f33f21be7eb896a9ca 100644 (file)
@@ -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;
 
index 59744a931590c72ac2ba256c05610cc3026730d1..914e99367bb71a71ebbb083247b712e1ddb5b671 100644 (file)
@@ -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;
index 75390965b31b4fdb31f72e3ce6ee0924672e27cf..191a9124f771e343318596405b7fb4e3e875d86e 100644 (file)
@@ -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;
index 7cbb1850de00c18c337c5c20b11da0a6924fc998..47379fd57cf5a261e5a601cae29749fc1b535285 100644 (file)
@@ -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 */
index e430fe414ba18465fc7d38f57145336a8ccac14b..1caf79254327b78cc64bc98c2cff91d1c8e64716 100644 (file)
@@ -36,7 +36,6 @@
 #include "smb.h"
 
 /* these live in util.c */
-extern XFILE *dbf;
 extern int DEBUGLEVEL;
 
 /***********************************************
index 6a5b35db3b58c85c9d742d0f1fa2a326b0dbc321..df697a0ed1bf3245fa0fa8a2f4a437faa5ff3a0f 100644 (file)
@@ -35,7 +35,6 @@
 #include "smb.h"
 
 /* these live in util.c */
-extern XFILE *dbf;
 extern int DEBUGLEVEL;
 
 int main(int argc, char *argv[])
index 8551c5e907ed8b58440dc5778abb40296a3233bb..56ce321f8d82fbc3cc4c8e789f7e5e10f34357eb 100644 (file)
@@ -999,7 +999,6 @@ static void printers_page(void)
 {
        extern char *optarg;
        extern int optind;
-       extern XFILE *dbf;
        int opt;
        char *page;