On Sat, Nov 02, 2002 at 12:23:52PM +0100, Hans Westerbeek wrote: > Hi all, > > I'm trying to build qmail with patch qmail-ldap-1.03-20021101. > This is the error I get: > > ./compile maildir++.c > maildir++.c: In function `quota_check': > maildir++.c:214: `NULL' undeclared (first use in this function) > maildir++.c:214: (Each undeclared identifier is reported only once > maildir++.c:214: for each function it appears in.) > maildir++.c: In function `quota_get': > maildir++.c:247: `NULL' undeclared (first use in this function) > maildir++.c: In function `quota_writesize': > maildir++.c:424: `NULL' undeclared (first use in this function) > make: *** [maildir++.o] Error 1 > > Any thoughts? I Couldn't find anything about this errormessage anywhere... >
Sorry, my fault. I forgot that NULL may not be used in qmail and qmail-ldap because on some architectures it is not defined (unless some include file is iincluded). One our developpement machines (OpenBSD and FreeBSD) we do not get the error. Try the attached patch, this should fix your problem. -- :wq Claudio
Index: maildir++.c =================================================================== RCS file: /home/cvs-qmail-ldap/CVS/qmail-ldap/maildir++.c,v retrieving revision 1.18 diff -u -r1.18 maildir++.c --- maildir++.c 29 Oct 2002 15:05:38 -0000 1.18 +++ maildir++.c 3 Nov 2002 11:28:10 -0000 @@ -211,7 +211,7 @@ return 0; } - if (perc != NULL) { + if (perc != (int *)0) { sp = q->quota_size != 0 ? (int)((q->size + size)*100.0/q->quota_size) : 0; @@ -244,7 +244,7 @@ q->size = 0; q->count = 0; - if (quota == NULL) return; + if (quota == (char *)0) return; while (*quota) { if (*quota < '0' || *quota > '9') { @@ -421,7 +421,7 @@ tm = now(); pid = getpid(); buf = (char *)alloc(path.len + 17 + (2 * FMT_ULONG) + 2); - if (buf == NULL) + if (buf == (char *)0) temp_nomem(); s = buf; byte_copy(s, path.len, path.s); s += path.len;