Home | History | Annotate | Download | only in patches
      1 --- servers/slapd/proto-slap.h	2003/07/22 08:24:49	1.1
      2 +++ servers/slapd/proto-slap.h	2003/07/22 08:25:56
      3 @@ -999,6 +999,9 @@
      4  	BerVarray *vals,
      5  	BerVarray addvals ));
      6  
      7 +/* assumes (x) > (y) returns 1 if true, 0 otherwise */
      8 +#define SLAP_PTRCMP(x, y) ((x) < (y) ? -1 : (x) > (y))
      9 +
     10  /*
     11   * Other...
     12   */
     13 --- servers/slapd/back-ldbm/attr.c	2003/07/22 08:25:02	1.1
     14 +++ servers/slapd/back-ldbm/attr.c	2003/07/22 08:28:21
     15 @@ -27,7 +27,7 @@
     16      AttrInfo	*a
     17  )
     18  {
     19 -	return desc - a->ai_desc;
     20 +	return SLAP_PTRCMP(desc, a->ai_desc);
     21  }
     22  
     23  static int
     24 @@ -36,7 +36,7 @@
     25      AttrInfo	*b
     26  )
     27  {
     28 -	return a->ai_desc - b->ai_desc;
     29 +	return SLAP_PTRCMP(a->ai_desc, b->ai_desc);
     30  }
     31  
     32  void
     33 --- servers/slapd/back-bdb/attr.c	2003/07/22 08:25:08	1.1
     34 +++ servers/slapd/back-bdb/attr.c	2003/07/22 08:29:13
     35 @@ -27,7 +27,7 @@
     36  	AttrInfo	*a
     37  )
     38  {
     39 -	return desc - a->ai_desc;
     40 +	return SLAP_PTRCMP(desc, a->ai_desc);
     41  }
     42  
     43  static int
     44 @@ -36,7 +36,7 @@
     45  	AttrInfo	*b
     46  )
     47  {
     48 -	return a->ai_desc - b->ai_desc;
     49 +	return SLAP_PTRCMP(a->ai_desc, b->ai_desc);
     50  }
     51  
     52  void
     53