patches/avl_ptrcmp.dif
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 9397 b16e349d18c5
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9397
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     1
--- servers/slapd/proto-slap.h	2003/07/22 08:24:49	1.1
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     2
+++ servers/slapd/proto-slap.h	2003/07/22 08:25:56
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     3
@@ -999,6 +999,9 @@
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     4
 	BerVarray *vals,
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     5
 	BerVarray addvals ));
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     6
 
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     7
+/* assumes (x) > (y) returns 1 if true, 0 otherwise */
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     8
+#define SLAP_PTRCMP(x, y) ((x) < (y) ? -1 : (x) > (y))
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
     9
+
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    10
 /*
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    11
  * Other...
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    12
  */
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    13
--- servers/slapd/back-ldbm/attr.c	2003/07/22 08:25:02	1.1
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    14
+++ servers/slapd/back-ldbm/attr.c	2003/07/22 08:28:21
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    15
@@ -27,7 +27,7 @@
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    16
     AttrInfo	*a
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    17
 )
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    18
 {
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    19
-	return desc - a->ai_desc;
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    20
+	return SLAP_PTRCMP(desc, a->ai_desc);
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    21
 }
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    22
 
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    23
 static int
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    24
@@ -36,7 +36,7 @@
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    25
     AttrInfo	*b
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    26
 )
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    27
 {
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    28
-	return a->ai_desc - b->ai_desc;
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    29
+	return SLAP_PTRCMP(a->ai_desc, b->ai_desc);
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    30
 }
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    31
 
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    32
 void
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    33
--- servers/slapd/back-bdb/attr.c	2003/07/22 08:25:08	1.1
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    34
+++ servers/slapd/back-bdb/attr.c	2003/07/22 08:29:13
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    35
@@ -27,7 +27,7 @@
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    36
 	AttrInfo	*a
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    37
 )
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    38
 {
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    39
-	return desc - a->ai_desc;
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    40
+	return SLAP_PTRCMP(desc, a->ai_desc);
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    41
 }
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    42
 
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    43
 static int
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    44
@@ -36,7 +36,7 @@
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    45
 	AttrInfo	*b
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    46
 )
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    47
 {
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    48
-	return a->ai_desc - b->ai_desc;
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    49
+	return SLAP_PTRCMP(a->ai_desc, b->ai_desc);
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    50
 }
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    51
 
b16e349d18c5 the easy part of the reorg (most files moved around)
laca
parents:
diff changeset
    52
 void