Mercurial > hg > xemacs-beta
diff src/device-tty.c @ 5401:4486ba63476b
Fix compile issues for C89 compilers. Use log() instead of log2().
author | Jeff Sparkes <jsparkes@gmail.com> |
---|---|
date | Sun, 17 Apr 2011 16:27:02 -0400 |
parents | 5256fedd50e6 |
children | 248176c74e6b |
line wrap: on
line diff
--- a/src/device-tty.c Sun Apr 17 11:14:38 2011 +0100 +++ b/src/device-tty.c Sun Apr 17 16:27:02 2011 -0400 @@ -197,7 +197,11 @@ return Fcons (make_int (CONSOLE_TTY_DATA (con)->width), make_int (CONSOLE_TTY_DATA (con)->height)); case DM_num_bit_planes: - return make_int (log2 (CONSOLE_TTY_DATA (con)->colors)); + { + EMACS_INT l2 = (EMACS_INT) (log (CONSOLE_TTY_DATA (con)->colors) + / log (2)); + return make_int (l2); + } case DM_num_color_cells: return make_int (CONSOLE_TTY_DATA (con)->colors); default: /* No such device metric property for TTY devices */