Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: tests/spec2k/197.parser/diff

Issue 2244023002: Fix bugs with SPEC2k for WebAssembly (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Add TODO for 175.vpr Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/spec2k/188.ammp/diff.README ('k') | tests/spec2k/197.parser/diff.README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/spec2k/197.parser/diff
diff --git a/tests/spec2k/197.parser/diff b/tests/spec2k/197.parser/diff
new file mode 100644
index 0000000000000000000000000000000000000000..4ae0e02bf5e3c7b9026513f127e9b3ef7a4b9ff0
--- /dev/null
+++ b/tests/spec2k/197.parser/diff
@@ -0,0 +1,74 @@
+diff -Naurb src2/main.c src/main.c
+--- src2/main.c 2016-08-15 20:29:35.487496988 -0700
++++ src/main.c 2016-08-15 20:27:50.297937988 -0700
+@@ -1034,7 +1034,8 @@
+ }
+ }
+
+-int compare_parse(Linkage_info * p1, Linkage_info * p2) {
++int compare_parse(const void* a, const void* b) {
++ const Linkage_info *p1 = (Linkage_info*) a, *p2 = (Linkage_info*) b;
+ /* for sorting the linkages */
+ if (p1->N_violations != p2->N_violations) {
+ return (p1->N_violations - p2->N_violations);
+@@ -1420,8 +1421,7 @@
+ N_canonical_linkages ++;
+ }
+ qsort((void *)linkage, N_canonical_linkages,
+- sizeof(Linkage_info),
+- (int (*)(const void *, const void *))compare_parse);
++ sizeof(Linkage_info), compare_parse);
+ }
+
+ assert(! ((N_canonical_linkages == 0) && (N_linkages > 0) && (N_linkages < linkage_count_limit)),
+@@ -1622,8 +1622,7 @@
+ N_canonical_linkages ++;
+ }
+ qsort((void *)linkage, N_canonical_linkages,
+- sizeof(Linkage_info),
+- (int (*)(const void *, const void *))compare_parse);
++ sizeof(Linkage_info), compare_parse);
+ }
+
+ print_time("Postprocessed some linkages");
+diff -Naurb src2/post-process.c src/post-process.c
+--- src2/post-process.c 2016-08-15 20:29:35.483496929 -0700
++++ src/post-process.c 2016-08-15 20:27:59.902080352 -0700
+@@ -379,7 +379,8 @@
+ }
+ }
+
+-int domain_compare(Domain * d1, Domain * d2) {
++int domain_compare(const void *a, const void *b) {
++ const Domain *d1 = (Domain*) a, *d2 = (Domain*) b;
+ /* for sorting the domains by size */
+ return (d1->size - d2->size) ;
+ }
+@@ -434,8 +435,7 @@
+ N_domains++;
+ }
+ }
+- qsort((void *)domain_array, N_domains, sizeof(Domain),
+- (int (*)(const void *, const void *))domain_compare);
++ qsort((void *)domain_array, N_domains, sizeof(Domain), domain_compare);
+ /* sort the domains by size */
+
+ for (d=0; d<N_domains; d++) {
+diff -Naurb src2/strncasecmp.c src/strncasecmp.c
+--- src2/strncasecmp.c 2016-08-15 20:29:35.487496988 -0700
++++ src/strncasecmp.c 2016-08-15 15:29:09.408238838 -0700
+@@ -15,6 +15,7 @@
+ }
+ #endif
+
++#ifndef __EMSCRIPTEN__
+ int strncasecmp(const char *s1, const char *s2, size_t n)
+ {
+
+@@ -35,5 +36,6 @@
+ if (*j) return 1;
+ return 0;
+ }
++#endif
+
+
« no previous file with comments | « tests/spec2k/188.ammp/diff.README ('k') | tests/spec2k/197.parser/diff.README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698