diff options
| author | Po Lu | 2023-02-05 20:55:21 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-05 20:55:21 +0800 |
| commit | 0ee01457a84e031d490553949a2deacd4865a5bb (patch) | |
| tree | 9c22d8dce03d3055b6d321b77f70eec2e0af5aea /src | |
| parent | 87cdbbeb8a229926277578a9f5f958438e8679b6 (diff) | |
| parent | d27d9a43d4d1b3f8a213cb739f4d27793158a050 (diff) | |
| download | emacs-0ee01457a84e031d490553949a2deacd4865a5bb.tar.gz emacs-0ee01457a84e031d490553949a2deacd4865a5bb.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
| -rw-r--r-- | src/floatfns.c | 7 | ||||
| -rw-r--r-- | src/lisp.h | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index 1d891ef3ce1..13f0ca3e129 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -27,19 +27,22 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 27 | frexp, ldexp, log, log10 [via (log X 10)], *modf, pow, sin, *sinh, | 27 | frexp, ldexp, log, log10 [via (log X 10)], *modf, pow, sin, *sinh, |
| 28 | sqrt, tan, *tanh. | 28 | sqrt, tan, *tanh. |
| 29 | 29 | ||
| 30 | C99 and C11 require the following math.h functions in addition to | 30 | C99, C11 and C17 require the following math.h functions in addition to |
| 31 | the C89 functions. Of these, Emacs currently exports only the | 31 | the C89 functions. Of these, Emacs currently exports only the |
| 32 | starred ones to Lisp, since we haven't found a use for the others. | 32 | starred ones to Lisp, since we haven't found a use for the others. |
| 33 | Also, it uses the ones marked "+" internally: | 33 | Also, it uses the ones marked "+" internally: |
| 34 | acosh, atanh, cbrt, copysign (implemented by signbit), erf, erfc, | 34 | acosh, atanh, cbrt, copysign (implemented by signbit), erf, erfc, |
| 35 | exp2, expm1, fdim, fma, fmax, fmin, fpclassify, hypot, +ilogb, | 35 | exp2, expm1, fdim, fma, fmax, fmin, fpclassify, hypot, +ilogb, |
| 36 | isfinite, isgreater, isgreaterequal, isinf, isless, islessequal, | 36 | +isfinite, isgreater, isgreaterequal, +isinf, isless, islessequal, |
| 37 | islessgreater, *isnan, isnormal, isunordered, lgamma, log1p, *log2 | 37 | islessgreater, *isnan, isnormal, isunordered, lgamma, log1p, *log2 |
| 38 | [via (log X 2)], logb (approximately; implemented by frexp), | 38 | [via (log X 2)], logb (approximately; implemented by frexp), |
| 39 | +lrint/llrint, +lround/llround, nan, nearbyint, nextafter, | 39 | +lrint/llrint, +lround/llround, nan, nearbyint, nextafter, |
| 40 | nexttoward, remainder, remquo, *rint, round, scalbln, +scalbn, | 40 | nexttoward, remainder, remquo, *rint, round, scalbln, +scalbn, |
| 41 | +signbit, tgamma, *trunc. | 41 | +signbit, tgamma, *trunc. |
| 42 | 42 | ||
| 43 | C23 requires many more math.h functions. Emacs does not yet export | ||
| 44 | or use them. | ||
| 45 | |||
| 43 | The C standard also requires functions for float and long double | 46 | The C standard also requires functions for float and long double |
| 44 | that are not listed above. Of these functions, Emacs uses only the | 47 | that are not listed above. Of these functions, Emacs uses only the |
| 45 | following internally: fabsf, powf, sprintf. | 48 | following internally: fabsf, powf, sprintf. |
diff --git a/src/lisp.h b/src/lisp.h index b545c498173..6abde4d545e 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -277,7 +277,7 @@ DEFINE_GDB_SYMBOL_END (VALMASK) | |||
| 277 | emacs_align_type union in alloc.c. | 277 | emacs_align_type union in alloc.c. |
| 278 | 278 | ||
| 279 | Although these macros are reasonably portable, they are not | 279 | Although these macros are reasonably portable, they are not |
| 280 | guaranteed on non-GCC platforms, as C11 does not require support | 280 | guaranteed on non-GCC platforms, as the C standard does not require support |
| 281 | for alignment to GCALIGNMENT and older compilers may ignore | 281 | for alignment to GCALIGNMENT and older compilers may ignore |
| 282 | alignment requests. For any type T where garbage collection | 282 | alignment requests. For any type T where garbage collection |
| 283 | requires alignment, use verify (GCALIGNED (T)) to verify the | 283 | requires alignment, use verify (GCALIGNED (T)) to verify the |
| @@ -2967,9 +2967,10 @@ XFLOAT_DATA (Lisp_Object f) | |||
| 2967 | /* Most hosts nowadays use IEEE floating point, so they use IEC 60559 | 2967 | /* Most hosts nowadays use IEEE floating point, so they use IEC 60559 |
| 2968 | representations, have infinities and NaNs, and do not trap on | 2968 | representations, have infinities and NaNs, and do not trap on |
| 2969 | exceptions. Define IEEE_FLOATING_POINT to 1 if this host is one of the | 2969 | exceptions. Define IEEE_FLOATING_POINT to 1 if this host is one of the |
| 2970 | typical ones. The C11 macro __STDC_IEC_559__ is close to what is | 2970 | typical ones. The C23 macro __STDC_IEC_60559_BFP__ (or its |
| 2971 | obsolescent C11 counterpart __STDC_IEC_559__) is close to what is | ||
| 2971 | wanted here, but is not quite right because Emacs does not require | 2972 | wanted here, but is not quite right because Emacs does not require |
| 2972 | all the features of C11 Annex F (and does not require C11 at all, | 2973 | all the features of C23 Annex F (and does not require C11 or later, |
| 2973 | for that matter). */ | 2974 | for that matter). */ |
| 2974 | 2975 | ||
| 2975 | #define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ | 2976 | #define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ |
diff --git a/src/xdisp.c b/src/xdisp.c index 262a823f899..8082534c0a9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12448,7 +12448,7 @@ display_echo_area (struct window *w) | |||
| 12448 | reset the echo_area_buffer in question to nil at the end because | 12448 | reset the echo_area_buffer in question to nil at the end because |
| 12449 | with_echo_area_buffer will set it to an empty buffer. */ | 12449 | with_echo_area_buffer will set it to an empty buffer. */ |
| 12450 | bool i = display_last_displayed_message_p; | 12450 | bool i = display_last_displayed_message_p; |
| 12451 | /* According to the C99, C11 and C++11 standards, the integral value | 12451 | /* According to the C standard, the integral value |
| 12452 | of a "bool" is always 0 or 1, so this array access is safe here, | 12452 | of a "bool" is always 0 or 1, so this array access is safe here, |
| 12453 | if oddly typed. */ | 12453 | if oddly typed. */ |
| 12454 | no_message_p = NILP (echo_area_buffer[i]); | 12454 | no_message_p = NILP (echo_area_buffer[i]); |