diff options
| author | Po Lu | 2023-08-29 10:47:21 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-29 10:47:56 +0800 |
| commit | 804a96af28235b8a1a1199fc9c2e96e367ce14f6 (patch) | |
| tree | 137fb0ad340225d4cf6eeff5f6a0acad2b18e2ff /src | |
| parent | fb4be1d5ae97694cdfc7fd7570bac7cd3bb8f895 (diff) | |
| download | emacs-804a96af28235b8a1a1199fc9c2e96e367ce14f6.tar.gz emacs-804a96af28235b8a1a1199fc9c2e96e367ce14f6.zip | |
Update Android port
* src/sfnt.c (xfree, sfnt_make_interpreter)
(stack_overflow_test_args, stack_underflow_test_args)
(dup_test_args, clear_test_args, raw_test_args, fdef_test_args)
(fdef_1_test_args, endf_test_args, rs_test_args, debug_test_args)
(eif_test_args, sds_test_args, round_test_args, sangw_test_args)
(aa_test_args, scantype_test_args): Include alloca.h. Minor
fixes for standards conformance.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sfnt.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/sfnt.c b/src/sfnt.c index 87a11019b13..b66613eaa53 100644 --- a/src/sfnt.c +++ b/src/sfnt.c | |||
| @@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 34 | #include <unistd.h> | 34 | #include <unistd.h> |
| 35 | #include <setjmp.h> | 35 | #include <setjmp.h> |
| 36 | #include <errno.h> | 36 | #include <errno.h> |
| 37 | #include <alloca.h> | ||
| 37 | 38 | ||
| 38 | #ifdef HAVE_MMAP | 39 | #ifdef HAVE_MMAP |
| 39 | #include <sys/mman.h> | 40 | #include <sys/mman.h> |
| @@ -82,7 +83,7 @@ xrealloc (void *ptr, size_t size) | |||
| 82 | static void | 83 | static void |
| 83 | xfree (void *ptr) | 84 | xfree (void *ptr) |
| 84 | { | 85 | { |
| 85 | return free (ptr); | 86 | free (ptr); |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | /* Use this for functions that are static while building in test mode, | 89 | /* Use this for functions that are static while building in test mode, |
| @@ -5686,7 +5687,7 @@ sfnt_make_interpreter (struct sfnt_maxp_table *maxp, | |||
| 5686 | interpreter->run_hook = NULL; | 5687 | interpreter->run_hook = NULL; |
| 5687 | interpreter->push_hook = NULL; | 5688 | interpreter->push_hook = NULL; |
| 5688 | interpreter->pop_hook = NULL; | 5689 | interpreter->pop_hook = NULL; |
| 5689 | #endif | 5690 | #endif /* TEST */ |
| 5690 | 5691 | ||
| 5691 | /* Fill in pointers and default values. */ | 5692 | /* Fill in pointers and default values. */ |
| 5692 | interpreter->max_stack_elements = maxp->max_stack_elements; | 5693 | interpreter->max_stack_elements = maxp->max_stack_elements; |
| @@ -16305,7 +16306,7 @@ static struct sfnt_generic_test_args pushw_test_args = | |||
| 16305 | 16306 | ||
| 16306 | static struct sfnt_generic_test_args stack_overflow_test_args = | 16307 | static struct sfnt_generic_test_args stack_overflow_test_args = |
| 16307 | { | 16308 | { |
| 16308 | (uint32_t[]) { }, | 16309 | NULL, |
| 16309 | 0, | 16310 | 0, |
| 16310 | true, | 16311 | true, |
| 16311 | 0, | 16312 | 0, |
| @@ -16313,8 +16314,7 @@ static struct sfnt_generic_test_args stack_overflow_test_args = | |||
| 16313 | 16314 | ||
| 16314 | static struct sfnt_generic_test_args stack_underflow_test_args = | 16315 | static struct sfnt_generic_test_args stack_underflow_test_args = |
| 16315 | { | 16316 | { |
| 16316 | /* GCC BUG, this should be []! */ | 16317 | NULL, |
| 16317 | (uint32_t []) { }, | ||
| 16318 | 0, | 16318 | 0, |
| 16319 | true, | 16319 | true, |
| 16320 | 4, | 16320 | 4, |
| @@ -16441,7 +16441,7 @@ static struct sfnt_generic_test_args jmpr_test_args = | |||
| 16441 | 16441 | ||
| 16442 | static struct sfnt_generic_test_args dup_test_args = | 16442 | static struct sfnt_generic_test_args dup_test_args = |
| 16443 | { | 16443 | { |
| 16444 | (uint32_t []) { }, | 16444 | NULL, |
| 16445 | 0, | 16445 | 0, |
| 16446 | true, | 16446 | true, |
| 16447 | 5, | 16447 | 5, |
| @@ -16457,7 +16457,7 @@ static struct sfnt_generic_test_args pop_test_args = | |||
| 16457 | 16457 | ||
| 16458 | static struct sfnt_generic_test_args clear_test_args = | 16458 | static struct sfnt_generic_test_args clear_test_args = |
| 16459 | { | 16459 | { |
| 16460 | (uint32_t []) { }, | 16460 | NULL, |
| 16461 | 0, | 16461 | 0, |
| 16462 | false, | 16462 | false, |
| 16463 | 10, | 16463 | 10, |
| @@ -16497,7 +16497,7 @@ static struct sfnt_generic_test_args mindex_test_args = | |||
| 16497 | 16497 | ||
| 16498 | static struct sfnt_generic_test_args raw_test_args = | 16498 | static struct sfnt_generic_test_args raw_test_args = |
| 16499 | { | 16499 | { |
| 16500 | (uint32_t []) { }, | 16500 | NULL, |
| 16501 | 0, | 16501 | 0, |
| 16502 | true, | 16502 | true, |
| 16503 | 0, | 16503 | 0, |
| @@ -16521,7 +16521,7 @@ static struct sfnt_generic_test_args call_test_args = | |||
| 16521 | 16521 | ||
| 16522 | static struct sfnt_generic_test_args fdef_test_args = | 16522 | static struct sfnt_generic_test_args fdef_test_args = |
| 16523 | { | 16523 | { |
| 16524 | (uint32_t []) { }, | 16524 | NULL, |
| 16525 | 0, | 16525 | 0, |
| 16526 | true, | 16526 | true, |
| 16527 | 4, | 16527 | 4, |
| @@ -16529,7 +16529,7 @@ static struct sfnt_generic_test_args fdef_test_args = | |||
| 16529 | 16529 | ||
| 16530 | static struct sfnt_generic_test_args fdef_1_test_args = | 16530 | static struct sfnt_generic_test_args fdef_1_test_args = |
| 16531 | { | 16531 | { |
| 16532 | (uint32_t []) { }, | 16532 | NULL, |
| 16533 | 0, | 16533 | 0, |
| 16534 | true, | 16534 | true, |
| 16535 | 9, | 16535 | 9, |
| @@ -16537,7 +16537,7 @@ static struct sfnt_generic_test_args fdef_1_test_args = | |||
| 16537 | 16537 | ||
| 16538 | static struct sfnt_generic_test_args endf_test_args = | 16538 | static struct sfnt_generic_test_args endf_test_args = |
| 16539 | { | 16539 | { |
| 16540 | (uint32_t []) { }, | 16540 | NULL, |
| 16541 | 0, | 16541 | 0, |
| 16542 | true, | 16542 | true, |
| 16543 | 0, | 16543 | 0, |
| @@ -16553,7 +16553,7 @@ static struct sfnt_generic_test_args ws_test_args = | |||
| 16553 | 16553 | ||
| 16554 | static struct sfnt_generic_test_args rs_test_args = | 16554 | static struct sfnt_generic_test_args rs_test_args = |
| 16555 | { | 16555 | { |
| 16556 | (uint32_t []) { }, | 16556 | NULL, |
| 16557 | 0, | 16557 | 0, |
| 16558 | true, | 16558 | true, |
| 16559 | 2, | 16559 | 2, |
| @@ -16593,7 +16593,7 @@ static struct sfnt_generic_test_args mps_test_args = | |||
| 16593 | 16593 | ||
| 16594 | static struct sfnt_generic_test_args debug_test_args = | 16594 | static struct sfnt_generic_test_args debug_test_args = |
| 16595 | { | 16595 | { |
| 16596 | (uint32_t []) { }, | 16596 | NULL, |
| 16597 | 0, | 16597 | 0, |
| 16598 | false, | 16598 | false, |
| 16599 | 3, | 16599 | 3, |
| @@ -16674,7 +16674,7 @@ static struct sfnt_generic_test_args if_test_args = | |||
| 16674 | 16674 | ||
| 16675 | static struct sfnt_generic_test_args eif_test_args = | 16675 | static struct sfnt_generic_test_args eif_test_args = |
| 16676 | { | 16676 | { |
| 16677 | (uint32_t []) { }, | 16677 | NULL, |
| 16678 | 0, | 16678 | 0, |
| 16679 | false, | 16679 | false, |
| 16680 | 3, | 16680 | 3, |
| @@ -16706,7 +16706,7 @@ static struct sfnt_generic_test_args not_test_args = | |||
| 16706 | 16706 | ||
| 16707 | static struct sfnt_generic_test_args sds_test_args = | 16707 | static struct sfnt_generic_test_args sds_test_args = |
| 16708 | { | 16708 | { |
| 16709 | (uint32_t []) { }, | 16709 | NULL, |
| 16710 | 0, | 16710 | 0, |
| 16711 | true, | 16711 | true, |
| 16712 | 5, | 16712 | 5, |
| @@ -16778,7 +16778,7 @@ static struct sfnt_generic_test_args ceiling_test_args = | |||
| 16778 | 16778 | ||
| 16779 | static struct sfnt_generic_test_args round_test_args = | 16779 | static struct sfnt_generic_test_args round_test_args = |
| 16780 | { | 16780 | { |
| 16781 | (uint32_t []) { }, | 16781 | NULL, |
| 16782 | 0, | 16782 | 0, |
| 16783 | true, | 16783 | true, |
| 16784 | 0, | 16784 | 0, |
| @@ -16954,7 +16954,7 @@ static struct sfnt_generic_test_args rdtg_test_args = | |||
| 16954 | 16954 | ||
| 16955 | static struct sfnt_generic_test_args sangw_test_args = | 16955 | static struct sfnt_generic_test_args sangw_test_args = |
| 16956 | { | 16956 | { |
| 16957 | (uint32_t []) { }, | 16957 | NULL, |
| 16958 | 0, | 16958 | 0, |
| 16959 | false, | 16959 | false, |
| 16960 | 3, | 16960 | 3, |
| @@ -16962,7 +16962,7 @@ static struct sfnt_generic_test_args sangw_test_args = | |||
| 16962 | 16962 | ||
| 16963 | static struct sfnt_generic_test_args aa_test_args = | 16963 | static struct sfnt_generic_test_args aa_test_args = |
| 16964 | { | 16964 | { |
| 16965 | (uint32_t []) { }, | 16965 | NULL, |
| 16966 | 0, | 16966 | 0, |
| 16967 | false, | 16967 | false, |
| 16968 | 3, | 16968 | 3, |
| @@ -17022,7 +17022,7 @@ static struct sfnt_generic_test_args min_test_args = | |||
| 17022 | 17022 | ||
| 17023 | static struct sfnt_generic_test_args scantype_test_args = | 17023 | static struct sfnt_generic_test_args scantype_test_args = |
| 17024 | { | 17024 | { |
| 17025 | (uint32_t []) { }, | 17025 | NULL, |
| 17026 | 0, | 17026 | 0, |
| 17027 | false, | 17027 | false, |
| 17028 | 3, | 17028 | 3, |