1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-07 12:23:51 +03:00

declare dbf in one spot

This commit is contained in:
Andrew Tridgell
-
parent f59826c0c9
commit f41c3bb80f
21 changed files with 7 additions and 19 deletions

View File

@@ -2280,7 +2280,6 @@ static int do_message_op(void)
fstring base_directory; fstring base_directory;
char *pname = argv[0]; char *pname = argv[0];
int opt; int opt;
extern XFILE *dbf;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
int old_debug; int old_debug;

View File

@@ -71,7 +71,6 @@ stack dir_stack = {NULL, 0}; /* Want an empty stack */
#define SEPARATORS " \t\n\r" #define SEPARATORS " \t\n\r"
extern int DEBUGLEVEL; extern int DEBUGLEVEL;
extern struct cli_state *cli; extern struct cli_state *cli;
extern XFILE *dbf;
/* These defines are for the do_setrattr routine, to indicate /* These defines are for the do_setrattr routine, to indicate
* setting and reseting of file attributes in the function call */ * setting and reseting of file attributes in the function call */

View File

@@ -40,6 +40,8 @@
int Debug1( char *, ... ) PRINTF_ATTRIBUTE(1,2); int Debug1( char *, ... ) PRINTF_ATTRIBUTE(1,2);
BOOL dbgtext( 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. */ /* If we have these macros, we can add additional info to the header. */
#ifdef HAVE_FILE_MACRO #ifdef HAVE_FILE_MACRO
#define FILE_MACRO (__FILE__) #define FILE_MACRO (__FILE__)

View File

@@ -626,6 +626,7 @@ extern int errno;
#endif #endif
/* Lists, trees, caching, database... */ /* Lists, trees, caching, database... */
#include "xfile.h"
#include "ubi_sLinkList.h" #include "ubi_sLinkList.h"
#include "ubi_dLinkList.h" #include "ubi_dLinkList.h"
#include "dlinklist.h" #include "dlinklist.h"
@@ -640,7 +641,6 @@ extern int errno;
#include "messages.h" #include "messages.h"
#include "util_list.h" #include "util_list.h"
#include "charset.h" #include "charset.h"
#include "xfile.h"
#include "util_getent.h" #include "util_getent.h"

View File

@@ -19,6 +19,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifndef _XFILE_H_
#define _XFILE_H_
/* /*
see xfile.c for explanations see xfile.c for explanations
*/ */
@@ -42,3 +44,5 @@ extern XFILE *x_stdin, *x_stdout, *x_stderr;
#define X_IONBF 2 #define X_IONBF 2
#define x_getc(f) x_fgetc(f) #define x_getc(f) x_fgetc(f)
#endif /* _XFILE_H_ */

View File

@@ -917,7 +917,6 @@ static uint32 cmd_set(CLIENT_INFO *info, int argc, char *argv[])
BOOL interactive = True; BOOL interactive = True;
char *cmd_str = NULL; char *cmd_str = NULL;
int opt; int opt;
extern XFILE *dbf;
extern char *optarg; extern char *optarg;
static pstring servicesf = CONFIGFILE; static pstring servicesf = CONFIGFILE;
pstring term_code; pstring term_code;

View File

@@ -49,7 +49,6 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void),
int end)) int end))
{ {
fd_set fds; fd_set fds;
extern XFILE *dbf;
static pstring line; static pstring line;
struct timeval timeout; struct timeval timeout;
int fd = fileno(stdin); int fd = fileno(stdin);

View File

@@ -666,7 +666,6 @@ static void usage(char *pname)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
int opt; int opt;
extern XFILE *dbf;
extern char *optarg; extern char *optarg;
extern BOOL append_log; extern BOOL append_log;

View File

@@ -42,7 +42,6 @@ int main(int argc, char *argv[])
int opt; int opt;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
dbf = x_stdout; dbf = x_stdout;
smbw_setup_shared(); smbw_setup_shared();

View File

@@ -47,7 +47,6 @@ void smbw_init(void)
extern BOOL in_client; extern BOOL in_client;
static int initialised; static int initialised;
static pstring servicesf = CONFIGFILE; static pstring servicesf = CONFIGFILE;
extern XFILE *dbf;
char *p; char *p;
int eno; int eno;
pstring line; pstring line;

View File

@@ -545,7 +545,6 @@ static void usage(void)
char *share[NSERVERS]; char *share[NSERVERS];
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *p; char *p;
int seed, server; int seed, server;

View File

@@ -533,7 +533,6 @@ static void usage(void)
char *share1, *share2, *nfspath1, *nfspath2; char *share1, *share2, *nfspath1, *nfspath2;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *p; char *p;
int seed; int seed;

View File

@@ -420,7 +420,6 @@ static void usage(void)
struct cli_state *cli; struct cli_state *cli;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *p; char *p;
int seed; int seed;

View File

@@ -229,7 +229,6 @@ enum client_action
{ {
char *pname = argv[0]; char *pname = argv[0];
int opt; int opt;
extern XFILE *dbf;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
static pstring servicesf = CONFIGFILE; static pstring servicesf = CONFIGFILE;

View File

@@ -3077,7 +3077,6 @@ static void usage(void)
int gotpass = 0; int gotpass = 0;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
static pstring servicesf = CONFIGFILE; static pstring servicesf = CONFIGFILE;
BOOL correct = True; BOOL correct = True;

View File

@@ -802,7 +802,6 @@ You can string acls together with spaces, commas or newlines\n\
pstring filename; pstring filename;
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *p; char *p;
static pstring servicesf = CONFIGFILE; static pstring servicesf = CONFIGFILE;

View File

@@ -325,7 +325,6 @@ static BOOL print_tree(struct user_auth_info *user_info)
{ {
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *p; char *p;
pstring servicesf = CONFIGFILE; pstring servicesf = CONFIGFILE;

View File

@@ -45,7 +45,6 @@ struct session_record{
} *srecs; } *srecs;
extern int DEBUGLEVEL; extern int DEBUGLEVEL;
extern XFILE *dbf;
static pstring Ucrit_username = ""; /* added by OH */ static pstring Ucrit_username = ""; /* added by OH */
static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */ static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */

View File

@@ -36,7 +36,6 @@
#include "smb.h" #include "smb.h"
/* these live in util.c */ /* these live in util.c */
extern XFILE *dbf;
extern int DEBUGLEVEL; extern int DEBUGLEVEL;
/*********************************************** /***********************************************

View File

@@ -35,7 +35,6 @@
#include "smb.h" #include "smb.h"
/* these live in util.c */ /* these live in util.c */
extern XFILE *dbf;
extern int DEBUGLEVEL; extern int DEBUGLEVEL;
int main(int argc, char *argv[]) int main(int argc, char *argv[])

View File

@@ -999,7 +999,6 @@ static void printers_page(void)
{ {
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
extern XFILE *dbf;
int opt; int opt;
char *page; char *page;