Patch to source/tdb/tdb.c for compiling on Tru64 UNIX

samba-technical at thewrittenword.com samba-technical at thewrittenword.com
Fri Apr 13 11:52:24 GMT 2001


If compiling 2.2.0 from CVS on Tru64 UNIX 4.0D with 'cc -std', it
appears 'readonly' is a reserved word (-std is ANSI + relaxations
whereas -std1 is ANSI). Patch below renames readonly to read_only to
fix this.

-- 
albert chin (china at thewrittenword.com)

-- snip snip
Index: source/tdb/tdb.c
===================================================================
RCS file: /cvsroot/samba/source/tdb/tdb.c,v
retrieving revision 1.35.4.14
diff -u -3 -p -r1.35.4.14 tdb.c
--- source/tdb/tdb.c	2001/01/27 05:27:36	1.35.4.14
+++ source/tdb/tdb.c	2001/04/13 11:47:18
@@ -79,11 +79,11 @@ static void *tdb_munmap(void *ptr, tdb_l
 	return NULL;
 }
 
-static void *tdb_mmap(tdb_len size, int readonly, int fd)
+static void *tdb_mmap(tdb_len size, int read_only, int fd)
 {
 	void *ret = NULL;
 #ifdef HAVE_MMAP
-	ret = mmap(NULL, size, PROT_READ | (readonly ? 0 : PROT_WRITE), MAP_SHARED|MAP_FILE, fd, 0);
+	ret = mmap(NULL, size, PROT_READ | (read_only ? 0 : PROT_WRITE), MAP_SHARED|MAP_FILE, fd, 0);
 
 	if (ret == (void *)-1)
 		ret = NULL;




More information about the samba-technical mailing list