diff options
| author | Paul Eggert | 2011-08-29 13:57:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-29 13:57:42 -0700 |
| commit | 6e1a67fbe915e6fdc1d63a8e6c434aa79e4e7fb4 (patch) | |
| tree | f2a9bd3650385156ec388db480dbbf56c2cb22a8 | |
| parent | 1a091fbc08faa3bab85e74f7fac72a955600a8f6 (diff) | |
| download | emacs-6e1a67fbe915e6fdc1d63a8e6c434aa79e4e7fb4.tar.gz emacs-6e1a67fbe915e6fdc1d63a8e6c434aa79e4e7fb4.zip | |
* font.c, gtkutil.c: Include <float.h>.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/font.c | 1 | ||||
| -rw-r--r-- | src/gtkutil.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9f86c42d43b..1de15f4796e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -39,7 +39,8 @@ | |||
| 39 | * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; | 39 | * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; |
| 40 | use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. | 40 | use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. |
| 41 | 41 | ||
| 42 | * font.c (font_unparse_xlfd): Don't blindly alloca long strings. | 42 | * font.c: Include <float.h>, for DBL_MAX_10_EXP. |
| 43 | (font_unparse_xlfd): Don't blindly alloca long strings. | ||
| 43 | Don't assume XINT result fits in int, or that XFLOAT_DATA * 10 | 44 | Don't assume XINT result fits in int, or that XFLOAT_DATA * 10 |
| 44 | fits in int, when using sprintf. Use single snprintf to count | 45 | fits in int, when using sprintf. Use single snprintf to count |
| 45 | length of string rather than counting it via multiple sprintfs; | 46 | length of string rather than counting it via multiple sprintfs; |
| @@ -62,7 +63,8 @@ | |||
| 62 | use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does | 63 | use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does |
| 63 | not fit in int. | 64 | not fit in int. |
| 64 | 65 | ||
| 65 | * gtkutil.c (xg_check_special_colors, xg_set_geometry): | 66 | * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP. |
| 67 | (xg_check_special_colors, xg_set_geometry): | ||
| 66 | Make sprintf buffers a bit bigger, to avoid potential buffer overrun. | 68 | Make sprintf buffers a bit bigger, to avoid potential buffer overrun. |
| 67 | 69 | ||
| 68 | * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA. | 70 | * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA. |
diff --git a/src/font.c b/src/font.c index cc5939982d3..1609a2cc9ff 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License | |||
| 21 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 21 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <float.h> | ||
| 24 | #include <stdio.h> | 25 | #include <stdio.h> |
| 25 | #include <ctype.h> | 26 | #include <ctype.h> |
| 26 | #include <setjmp.h> | 27 | #include <setjmp.h> |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 5f23d597329..c154797735e 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | 21 | ||
| 22 | #ifdef USE_GTK | 22 | #ifdef USE_GTK |
| 23 | #include <float.h> | ||
| 23 | #include <signal.h> | 24 | #include <signal.h> |
| 24 | #include <stdio.h> | 25 | #include <stdio.h> |
| 25 | #include <setjmp.h> | 26 | #include <setjmp.h> |