summaryrefslogtreecommitdiff
path: root/parallel/pvm3/patches/patch-ao
blob: 9d47abb1b197ef72a490353eaa77873762025e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ao,v 1.1 1998/10/29 05:15:10 garbled Exp $
--- src/pmsg.c.orig	Tue Mar 10 12:32:31 1998
+++ src/pmsg.c	Wed Oct 28 11:23:53 1998
@@ -252,13 +252,28 @@
 				return ((3 << 4) | i) << o;
 
 			for (j = 0; j < n; j++)
+				if (j < n/2) {
+					if (p[n/2 - 1 - j ]
+					    != thesigs[i].bytes[j])
+						break;
+				} else {
+					if (p[n + n/2 - 1 - j ]
+					    != thesigs[i].bytes[j])
+						break;
+				}
+
+			if (j == n)
+				return ((1 << 4) | i) << o;
+
+			for (j = 0; j < n; j++)
 				if (p[n - 1 - j] != thesigs[i].bytes[j])
 					break;
 			if (j == n)
 				return i << o;
 		}
 	}
-	fprintf(stderr, "can't generate signature for my integer byte order\n");
+	fprintf(stderr,
+		"can't generate signature for my floating point byte order\n");
 	abort();
 	return 0;
 }