999-gcc4.diff   [plain text]


--- samba/source/client/smbmount.c.orig	2004-07-26 18:16:37.000000000 -0700
+++ samba/source/client/smbmount.c	2005-07-25 14:47:38.000000000 -0700
@@ -792,7 +792,7 @@
 			} else if(!strcmp(opts, "dmask")) {
 				mount_dmask = strtol(opteq+1, NULL, 8);
 			} else if(!strcmp(opts, "debug")) {
-				DEBUGLEVEL = val;
+				SAMBA_DEBUGLEVEL = val;
 			} else if(!strcmp(opts, "ip")) {
 				dest_ip = *interpret_addr2(opteq+1);
 				if (is_zero_ip(dest_ip)) {
@@ -865,7 +865,7 @@
 	extern int optind;
 	char *p;
 
-	DEBUGLEVEL = 1;
+	SAMBA_DEBUGLEVEL = 1;
 
 	/* here we are interactive, even if run from autofs */
 	setup_logging("mount.smbfs",True);
--- samba/source/include/debug.h.orig	2004-08-26 14:35:08.000000000 -0700
+++ samba/source/include/debug.h	2005-07-25 14:47:36.000000000 -0700
@@ -63,8 +63,8 @@
  * still be through a macro still called DEBUGLEVEL. This cannot be done now
  * because some references would expand incorrectly.
  */
-#define DEBUGLEVEL *debug_level
-extern int DEBUGLEVEL;
+#define SAMBA_DEBUGLEVEL *debug_level
+extern int SAMBA_DEBUGLEVEL;
 
 /*
  * Define all new debug classes here. A class is represented by an entry in
--- samba/source/include/includes.h.orig	2005-07-21 15:36:53.000000000 -0700
+++ samba/source/include/includes.h	2005-07-25 14:47:36.000000000 -0700
@@ -423,6 +423,7 @@
 #if defined(HPUX) && defined(TCP_MAXSEG)
 #undef TCP_MAXSEG
 #endif
+#define BOOL_DEFINED
 #include <rpcsvc/yp_prot.h>
 #endif
 #if defined(HAVE_RPCSVC_YPCLNT_H)
@@ -1233,7 +1234,7 @@
 #endif
 #endif
 
-extern int DEBUGLEVEL;
+extern int SAMBA_DEBUGLEVEL;
 
 #define MAX_SEC_CTX_DEPTH 8    /* Maximum number of security contexts */
 
--- samba/source/include/popt_common.h	2003-08-18 22:18:23.000000000 -0700
+++ samba/source/include/popt_common.h	2005-07-25 14:47:36.000000000 -0700
@@ -21,6 +21,8 @@
 #ifndef _POPT_COMMON_H
 #define _POPT_COMMON_H
 
+#include <popt.h>
+
 /* Common popt structures */
 extern struct poptOption popt_common_samba[];
 extern struct poptOption popt_common_connection[];
--- samba/source/lib/debug.c.orig	2005-01-06 15:22:05.000000000 -0800
+++ samba/source/lib/debug.c	2005-07-25 14:47:40.000000000 -0700
@@ -103,7 +103,7 @@
 BOOL    *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack;
 
 /* DEBUGLEVEL is #defined to *debug_level */
-int     DEBUGLEVEL = &debug_all_class_hack;
+int     SAMBA_DEBUGLEVEL = &debug_all_class_hack;
 
 
 /* -------------------------------------------------------------------------- **
@@ -201,7 +201,7 @@
 		int l = asprintf(&list[i],
 				"%s:%d ",
 				classname_table[i],
-				DEBUGLEVEL_CLASS_ISSET[i]?DEBUGLEVEL_CLASS[i]:DEBUGLEVEL);
+				DEBUGLEVEL_CLASS_ISSET[i]?DEBUGLEVEL_CLASS[i]:SAMBA_DEBUGLEVEL);
 		if (l < 0 || l > MAX_CLASS_NAME_SIZE) {
 			err = True;
 			goto done;
@@ -301,7 +301,7 @@
 	/* debug_level is the pointer used for the DEBUGLEVEL-thingy */
 	if (ndx==0) {
 		/* Transfer the initial level from debug_all_class_hack */
-		DEBUGLEVEL_CLASS[ndx] = DEBUGLEVEL;
+		DEBUGLEVEL_CLASS[ndx] = SAMBA_DEBUGLEVEL;
 	}
 	debug_level = DEBUGLEVEL_CLASS;
 
--- samba/source/lib/username.c.orig	2005-07-21 15:36:52.000000000 -0700
+++ samba/source/lib/username.c	2005-07-25 14:47:40.000000000 -0700
@@ -408,7 +408,7 @@
 	else 
 		DEBUG(10,("user_in_winbind_group_list: using cached user groups for [%s]\n", user));
  
- 	if ( DEBUGLEVEL >= 10 ) {
+ 	if ( SAMBA_DEBUGLEVEL >= 10 ) {
 		DEBUG(10,("user_in_winbind_group_list: using groups -- "));
 	 	for ( i=0; i<num_groups; i++ )
 			DEBUGADD(10,("%lu ", (unsigned long)groups[i]));
--- samba/source/lib/util.c.orig	2005-01-06 15:37:01.000000000 -0800
+++ samba/source/lib/util.c	2005-07-25 14:47:40.000000000 -0700
@@ -487,10 +487,10 @@
 
 	DEBUGADD(5,("smb_bcc=%d\n",bcc));
 
-	if (DEBUGLEVEL < 10)
+	if (SAMBA_DEBUGLEVEL < 10)
 		return;
 
-	if (DEBUGLEVEL < 50)
+	if (SAMBA_DEBUGLEVEL < 50)
 		bcc = MIN(bcc, 512);
 
 	dump_data(10, smb_buf(buf), bcc);	
--- samba/source/lib/util_sock.c.orig	2005-07-21 15:36:52.000000000 -0700
+++ samba/source/lib/util_sock.c	2005-07-25 14:47:40.000000000 -0700
@@ -139,7 +139,7 @@
 
 	/* wrapped in if statement to prevent streams leak in SCO Openserver 5.0 */
 	/* reported on samba-technical  --jerry */
-	if ( DEBUGLEVEL >= 5 ) {
+	if ( SAMBA_DEBUGLEVEL >= 5 ) {
 	for (; p->name != NULL; p++) {
 		if (getsockopt(s, p->level, p->option, (void *)&value, &vlen) == -1) {
 			DEBUG(5,("Could not test socket option %s.\n", p->name));
--- samba/source/libsmb/libsmbclient.c.orig	2005-01-06 15:22:18.000000000 -0800
+++ samba/source/libsmb/libsmbclient.c	2005-07-25 14:47:40.000000000 -0700
@@ -4440,7 +4440,7 @@
                 /* Do some library wide intialisations the first time we get called */
 
                 /* Set this to what the user wants */
-                DEBUGLEVEL = context->debug;
+                SAMBA_DEBUGLEVEL = context->debug;
                 
                 setup_logging( "libsmbclient", True);
 
--- samba/source/libsmb/namecache.c.orig	2003-07-09 17:18:04.000000000 -0700
+++ samba/source/libsmb/namecache.c	2005-07-25 14:47:40.000000000 -0700
@@ -126,7 +126,7 @@
 	 */
 	if (!gencache_init()) return False;
 
-	if ( DEBUGLEVEL >= 5 ) {
+	if ( SAMBA_DEBUGLEVEL >= 5 ) {
 		DEBUG(5, ("namecache_store: storing %d address%s for %s#%02x: ",
 			num_names, num_names == 1 ? "": "es", name, name_type));
 
--- samba/source/libsmb/namequery.c.orig	2005-01-06 15:37:03.000000000 -0800
+++ samba/source/libsmb/namequery.c	2005-07-25 14:47:40.000000000 -0700
@@ -1131,7 +1131,7 @@
 		}
  
 		/* Save in name cache */
-		if ( DEBUGLEVEL >= 100 ) {
+		if ( SAMBA_DEBUGLEVEL >= 100 ) {
 			for (i = 0; i < *return_count && DEBUGLEVEL == 100; i++)
 				DEBUG(100, ("Storing name %s of type %d (%s:%d)\n", name,
 					name_type, inet_ntoa((*return_iplist)[i].ip), (*return_iplist)[i].port));
@@ -1141,7 +1141,7 @@
 
 		/* Display some debugging info */
 
-		if ( DEBUGLEVEL >= 10 ) {
+		if ( SAMBA_DEBUGLEVEL >= 10 ) {
 			DEBUG(10, ("internal_resolve_name: returning %d addresses: ", *return_count));
 
 			for (i = 0; i < *return_count; i++) {
@@ -1401,7 +1401,7 @@
 			local_count = remove_duplicate_addrs2( return_iplist, local_count );
 		}
 		
-		if ( DEBUGLEVEL >= 4 ) {
+		if ( SAMBA_DEBUGLEVEL >= 4 ) {
 			DEBUG(4,("get_dc_list: returning %d ip addresses in an %sordered list\n", local_count, 
 				*ordered ? "":"un"));
 			DEBUG(4,("get_dc_list: "));
--- samba/source/libsmb/smberr.c.orig	2003-03-06 20:11:06.000000000 -0800
+++ samba/source/libsmb/smberr.c	2005-07-25 14:47:40.000000000 -0700
@@ -227,7 +227,7 @@
 				err_code_struct *err = err_classes[i].err_msgs;
 				for (j=0;err[j].name;j++)
 					if (num == err[j].code) {
-						if (DEBUGLEVEL > 0)
+						if (SAMBA_DEBUGLEVEL > 0)
 							slprintf(ret, sizeof(ret) - 1, "%s - %s (%s)",
 								 err_classes[i].class,
 								 err[j].name,err[j].message);
--- samba/source/nmbd/asyncdns.c.orig	2004-07-26 18:16:43.000000000 -0700
+++ samba/source/nmbd/asyncdns.c	2005-07-25 14:47:41.000000000 -0700
@@ -83,7 +83,7 @@
 	struct query_record r;
 	unstring qname;
 
-	DEBUGLEVEL = -1;
+	SAMBA_DEBUGLEVEL = -1;
 
 	while (1) {
 		if (read_data(fd_in, (char *)&r, sizeof(r)) != sizeof(r)) 
--- samba/source/nsswitch/winbindd.c.orig	2005-01-06 15:22:26.000000000 -0800
+++ samba/source/nsswitch/winbindd.c	2005-07-25 14:47:41.000000000 -0700
@@ -116,7 +116,7 @@
 	
 	DEBUG(0, ("\t%d clients currently active\n", winbindd_num_clients()));
 	
-	if (DEBUGLEVEL >= 2 && winbindd_num_clients()) {
+	if (SAMBA_DEBUGLEVEL >= 2 && winbindd_num_clients()) {
 		DEBUG(2, ("\tclient list:\n"));
 		for(tmp = winbindd_client_list(); tmp; tmp = tmp->next) {
 			DEBUG(2, ("\t\tpid %lu, sock %d, rbl %d, wbl %d\n",
--- samba/source/nsswitch/winbindd_group.c.orig	2005-01-06 15:22:28.000000000 -0800
+++ samba/source/nsswitch/winbindd_group.c	2005-07-25 14:47:41.000000000 -0700
@@ -137,7 +137,7 @@
 
 	DEBUG(10, ("looked up %d names\n", num_names));
 
-	if (DEBUGLEVEL >= 10) {
+	if (SAMBA_DEBUGLEVEL >= 10) {
 		for (i = 0; i < num_names; i++)
 			DEBUG(10, ("\t%20s %s %d\n", names[i], sid_to_string(sid_string, sid_mem[i]),
 				   name_types[i]));
--- samba/source/nsswitch/wins.c.orig	2005-01-06 15:37:04.000000000 -0800
+++ samba/source/nsswitch/wins.c	2005-07-25 14:47:41.000000000 -0700
@@ -77,7 +77,7 @@
 static void nss_wins_init(void)
 {
 	initialised = 1;
-	DEBUGLEVEL = 0;
+	SAMBA_DEBUGLEVEL = 0;
 	AllowDebugChange = False;
 
 	TimeInit();
--- samba/source/printing/nt_printing.c	2005-01-06 15:37:05.000000000 -0800
+++ samba/source/printing/nt_printing.c.orig	2005-07-25 14:47:42.000000000 -0700
@@ -4533,7 +4533,7 @@
 	
 	driver.info_3 = info;
 	
-	if ( DEBUGLEVEL >= 20 )
+	if ( SAMBA_DEBUGLEVEL >= 20 )
 		dump_a_printer_driver( driver, 3 );
 	
 	return False;
@@ -4941,7 +4941,7 @@
 		}
 	}
 
-	if (DEBUGLEVEL >= 10) {
+	if (SAMBA_DEBUGLEVEL >= 10) {
 		SEC_ACL *the_acl = (*secdesc_ctr)->sec->dacl;
 		int i;
 
--- samba/source/python/py_common.c.orig	2003-08-18 22:18:26.000000000 -0700
+++ samba/source/python/py_common.c	2005-07-25 14:47:42.000000000 -0700
@@ -67,7 +67,7 @@
 	if (!PyArg_ParseTuple(args, ""))
 		return NULL;
 
-	debuglevel = PyInt_FromLong(DEBUGLEVEL);
+	debuglevel = PyInt_FromLong(SAMBA_DEBUGLEVEL);
 
 	return debuglevel;
 }
@@ -79,7 +79,7 @@
 	if (!PyArg_ParseTuple(args, "i", &debuglevel))
 		return NULL;
 
-	DEBUGLEVEL = debuglevel;
+	SAMBA_DEBUGLEVEL = debuglevel;
 
 	Py_INCREF(Py_None);
 	return Py_None;
--- samba/source/python/py_lsa.c.orig	2004-12-04 13:00:00.000000000 -0800
+++ samba/source/python/py_lsa.c	2005-07-25 14:47:42.000000000 -0700
@@ -480,5 +480,5 @@
 	py_samba_init();
 
 	setup_logging("lsa", True);
-	DEBUGLEVEL = 10;
+	SAMBA_DEBUGLEVEL = 10;
 }
--- samba/source/python/py_samr.c.orig	2003-06-23 17:23:26.000000000 -0700
+++ samba/source/python/py_samr.c	2005-07-25 14:47:42.000000000 -0700
@@ -672,5 +672,5 @@
 	py_samba_init();
 
 	setup_logging("samr", True);
-	DEBUGLEVEL = 10;
+	SAMBA_DEBUGLEVEL = 10;
 }
--- samba/source/python/py_smb.c.orig	2004-12-04 13:00:00.000000000 -0800
+++ samba/source/python/py_smb.c	2005-07-25 14:47:42.000000000 -0700
@@ -439,5 +439,5 @@
 	py_samba_init();
 
 	setup_logging("smb", True);
-	DEBUGLEVEL = 3;
+	SAMBA_DEBUGLEVEL = 3;
 }
--- samba/source/registry/reg_frontend.c.orig	2005-01-06 15:22:50.000000000 -0800
+++ samba/source/registry/reg_frontend.c	2005-07-25 14:47:39.000000000 -0700
@@ -59,7 +59,7 @@
 			return False;
 	}
 
-	if ( DEBUGLEVEL >= 20 )
+	if ( SAMBA_DEBUGLEVEL >= 20 )
 		reghook_dump_cache(20);
 
 	return True;
--- samba/source/rpc_parse/parse_prs.c.orig	2005-01-06 15:22:55.000000000 -0800
+++ samba/source/rpc_parse/parse_prs.c	2005-07-25 14:47:39.000000000 -0700
@@ -52,7 +52,7 @@
 {
 	int fd, i;
 	pstring fname;
-	if (DEBUGLEVEL < 50) return;
+	if (SAMBA_DEBUGLEVEL < 50) return;
 	for (i=1;i<100;i++) {
 		if (v != -1) {
 			slprintf(fname,sizeof(fname)-1, "/tmp/%s_%d.%d.prs", name, v, i);
--- samba/source/rpc_server/srv_pipe.c.orig	2005-01-06 15:23:00.000000000 -0800
+++ samba/source/rpc_server/srv_pipe.c	2005-07-25 14:47:39.000000000 -0700
@@ -1579,7 +1579,7 @@
 
 	/* Check for buffer underflow in rpc parsing */
 
-	if ((DEBUGLEVEL >= 10) && 
+	if ((SAMBA_DEBUGLEVEL >= 10) && 
 	    (prs_offset(&p->in_data.data) != prs_data_size(&p->in_data.data))) {
 		size_t data_len = prs_data_size(&p->in_data.data) - prs_offset(&p->in_data.data);
 		char *data = SMB_MALLOC(data_len);
--- samba/source/rpc_server/srv_spoolss_nt.c.orig	2005-01-06 15:23:03.000000000 -0800
+++ samba/source/rpc_server/srv_spoolss_nt.c	2005-07-25 14:47:39.000000000 -0700
@@ -5876,7 +5876,7 @@
 
 	nt_printing_getsec(p->mem_ctx, Printer->sharename, &old_secdesc_ctr);
 
-	if (DEBUGLEVEL >= 10) {
+	if (SAMBA_DEBUGLEVEL >= 10) {
 		SEC_ACL *the_acl;
 		int i;
 
--- samba/source/rpcclient/rpcclient.c.orig	2005-01-06 15:23:05.000000000 -0800
+++ samba/source/rpcclient/rpcclient.c	2005-07-25 14:47:39.000000000 -0700
@@ -291,10 +291,10 @@
 	}
 
 	if (argc == 2) {
-		DEBUGLEVEL = atoi(argv[1]);
+		SAMBA_DEBUGLEVEL = atoi(argv[1]);
 	}
 
-	printf("debuglevel is %d\n", DEBUGLEVEL);
+	printf("debuglevel is %d\n", SAMBA_DEBUGLEVEL);
 
 	return NT_STATUS_OK;
 }
--- samba/source/smbd/process.c.orig	2005-01-06 15:37:07.000000000 -0800
+++ samba/source/smbd/process.c	2005-07-25 14:47:38.000000000 -0700
@@ -824,7 +824,7 @@
 {
 	int fd, i;
 	pstring fname;
-	if (DEBUGLEVEL < 50) return;
+	if (SAMBA_DEBUGLEVEL < 50) return;
 
 	if (len < 4) len = smb_len(data)+4;
 	for (i=1;i<100;i++) {
--- samba/source/smbd/server.c.orig	2005-07-21 15:36:53.000000000 -0700
+++ samba/source/smbd/server.c	2005-07-25 14:47:38.000000000 -0700
@@ -620,12 +620,12 @@
 #endif
 
 	if (!reason) {   
-		int oldlevel = DEBUGLEVEL;
-		DEBUGLEVEL = 10;
+		int oldlevel = SAMBA_DEBUGLEVEL;
+		SAMBA_DEBUGLEVEL = 10;
 		DEBUG(0,("Last message was %s\n",smb_fn_name(last_message)));
 		if (last_inbuf)
 			show_msg(last_inbuf);
-		DEBUGLEVEL = oldlevel;
+		SAMBA_DEBUGLEVEL = oldlevel;
 		DEBUG(0,("===============================================================\n"));
 #if DUMP_CORE
 		if (dump_core()) return;
--- samba/source/smbwrapper/smbw.c.orig	2003-12-18 14:01:27.000000000 -0800
+++ samba/source/smbwrapper/smbw.c	2005-07-25 14:47:38.000000000 -0700
@@ -54,7 +54,7 @@
 
 	smbw_busy++;
 
-	DEBUGLEVEL = 0;
+	SAMBA_DEBUGLEVEL = 0;
 	setup_logging("smbsh",True);
 
 	dbf = x_stderr;
@@ -82,7 +82,7 @@
 		exit(1);
 
 	if ((p=smbw_getshared("DEBUG"))) {
-		DEBUGLEVEL = atoi(p);
+		SAMBA_DEBUGLEVEL = atoi(p);
 	}
 
 	if ((p=smbw_getshared("RESOLVE_ORDER"))) {
--- samba/source/torture/masktest.c.orig	2004-12-04 13:00:11.000000000 -0800
+++ samba/source/torture/masktest.c	2005-07-25 14:47:37.000000000 -0700
@@ -439,7 +439,7 @@
 
 	dbf = x_stderr;
 
-	DEBUGLEVEL = 0;
+	SAMBA_DEBUGLEVEL = 0;
 	AllowDebugChange = False;
 
 	if (argc < 2 || argv[1][0] == '-') {
@@ -471,7 +471,7 @@
 			NumLoops = atoi(optarg);
 			break;
 		case 'd':
-			DEBUGLEVEL = atoi(optarg);
+			SAMBA_DEBUGLEVEL = atoi(optarg);
 			break;
 		case 'E':
 			die_on_error = 1;
--- samba/source/torture/rpctorture.c.orig	2003-08-29 14:15:06.000000000 -0700
+++ samba/source/torture/rpctorture.c	2005-07-25 14:47:37.000000000 -0700
@@ -247,7 +247,7 @@
 		fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
 	}
 
-	DEBUGLEVEL = 0;
+	SAMBA_DEBUGLEVEL = 0;
 
 	cli_info.put_total_size = 0;
 	cli_info.put_total_time_ms = 0;
@@ -431,9 +431,9 @@
 			case 'd':
 			{
 				if (*optarg == 'A')
-					DEBUGLEVEL = 10000;
+					SAMBA_DEBUGLEVEL = 10000;
 				else
-					DEBUGLEVEL = atoi(optarg);
+					SAMBA_DEBUGLEVEL = atoi(optarg);
 				break;
 			}
 
--- samba/source/torture/torture.c.orig	2004-08-26 14:35:16.000000000 -0700
+++ samba/source/torture/torture.c	2005-07-25 14:47:37.000000000 -0700
@@ -4922,7 +4922,7 @@
 			torture_numops = atoi(optarg);
 			break;
 		case 'd':
-			DEBUGLEVEL = atoi(optarg);
+			SAMBA_DEBUGLEVEL = atoi(optarg);
 			break;
 		case 'O':
 			sockops = optarg;
--- samba/source/torture/vfstest.c.orig	2004-08-26 14:35:16.000000000 -0700
+++ samba/source/torture/vfstest.c	2005-07-25 14:47:37.000000000 -0700
@@ -189,10 +189,10 @@
 	}
 
 	if (argc == 2) {
-		DEBUGLEVEL = atoi(argv[1]);
+		SAMBA_DEBUGLEVEL = atoi(argv[1]);
 	}
 
-	printf("debuglevel is %d\n", DEBUGLEVEL);
+	printf("debuglevel is %d\n", SAMBA_DEBUGLEVEL);
 
 	return NT_STATUS_OK;
 }
--- samba/source/utils/net_rpc_printer.c.orig	2005-01-06 15:23:26.000000000 -0800
+++ samba/source/utils/net_rpc_printer.c	2005-07-25 14:47:36.000000000 -0700
@@ -337,7 +337,7 @@
 			goto out;
 		}
 
-		if (opt_verbose && DEBUGLEVEL >= 3)
+		if (opt_verbose && SAMBA_DEBUGLEVEL >= 3)
 			display_sec_desc(sd);
 	}
 
--- samba/source/utils/rpccheck.c.orig	2003-03-06 20:11:09.000000000 -0800
+++ samba/source/utils/rpccheck.c	2005-07-25 14:47:37.000000000 -0700
@@ -36,7 +36,7 @@
 	ZERO_STRUCT(rpc_stub);
 
 	setup_logging("", True);
-	DEBUGLEVEL=10;
+	SAMBA_DEBUGLEVEL=10;
 
 	ctx=talloc_init("main");
 	if (!ctx) exit(1);
--- samba/source/utils/smbpasswd.c.orig	2004-08-26 14:35:16.000000000 -0700
+++ samba/source/utils/smbpasswd.c	2005-07-25 14:47:37.000000000 -0700
@@ -147,7 +147,7 @@
 			lp_set_name_resolve_order(optarg);
 			break;
 		case 'D':
-			DEBUGLEVEL = atoi(optarg);
+			SAMBA_DEBUGLEVEL = atoi(optarg);
 			break;
 		case 'U': {
 			got_username = True;
--- samba/source/utils/testparm.c.orig	2004-12-04 13:00:12.000000000 -0800
+++ samba/source/utils/testparm.c	2005-07-25 14:47:37.000000000 -0700
@@ -243,7 +243,7 @@
 	}
 
 	dbf = x_stderr;
-	DEBUGLEVEL = 2;
+	SAMBA_DEBUGLEVEL = 2;
 	AllowDebugChange = False;
 
 	fprintf(stderr,"Load smb config files from %s\n",config_file);
--- samba/source/utils/testprns.c.orig	2003-03-06 20:11:09.000000000 -0800
+++ samba/source/utils/testprns.c	2005-07-25 14:47:36.000000000 -0700
@@ -46,7 +46,7 @@
       if (dbf == NULL) {
          printf("Unable to open logfile.\n");
       } else {
-         DEBUGLEVEL = 3;
+         SAMBA_DEBUGLEVEL = 3;
          pszTemp = (argc < 3) ? PRINTCAP_NAME : argv[2];
          printf("Looking for printer %s in printcap file %s\n", 
                  argv[1], pszTemp);
--- samba/source/wrepld/server.c.orig	2004-08-26 15:07:38.000000000 -0700
+++ samba/source/wrepld/server.c	2005-07-25 14:47:36.000000000 -0700
@@ -147,8 +147,8 @@
 
 	if (!reason) {   
 		int oldlevel = DEBUGLEVEL;
-		DEBUGLEVEL = 10;
-		DEBUGLEVEL = oldlevel;
+		SAMBA_DEBUGLEVEL = 10;
+		SAMBA_DEBUGLEVEL = oldlevel;
 		DEBUG(0,("===============================================================\n"));
 #if DUMP_CORE
 		if (dump_core()) return;