changeset 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 aa78b0b0b289
children 97968d099404 413bf5efaedb
files src/ChangeLog src/device-tty.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Apr 17 11:14:38 2011 +0100
+++ b/src/ChangeLog	Sun Apr 17 16:27:02 2011 -0400
@@ -1,3 +1,8 @@
+2011-04-17  Jeff Sparkes  <jsparkes@gmail.com>
+
+	* device-tty.c (tty_device_system_metrics): Fix compile issues for
+	C89 compilers.  Use log() instead of log2().
+
 2011-04-04  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* fns.c (count_with_tail):
--- 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 */