Index: src/Graphics/Renderer/renderer.cpp
===================================================================
--- src/Graphics/Renderer/renderer.cpp	(revision 6304)
+++ src/Graphics/Renderer/renderer.cpp	(working copy)
@@ -109,32 +109,32 @@
 
 void
 renderer_rep::set_zoom_factor (double zoom) {
-  if (shrinkf != ((int) ::round (std_shrinkf / zoomf)))
+  if (shrinkf != ((int) tm_round (std_shrinkf / zoomf)))
     cout << "Invalid zoom " << zoomf << ", " << shrinkf << LF;
-  ox = (SI) ::round (ox  * zoomf);
-  oy = (SI) ::round (oy  * zoomf);
+  ox = (SI) tm_round (ox  * zoomf);
+  oy = (SI) tm_round (oy  * zoomf);
   //cx1= (SI) ::floor (cx1 * zoomf);
   //cx2= (SI) ::floor (cx2 * zoomf);
   //cy1= (SI) ::ceil  (cy1 * zoomf);
   //cy2= (SI) ::ceil  (cy2 * zoomf);
-  cx1= (SI) ::round (cx1 * zoomf);
-  cx2= (SI) ::round (cx2 * zoomf);
-  cy1= (SI) ::round (cy1 * zoomf);
-  cy2= (SI) ::round (cy2 * zoomf);
+  cx1= (SI) tm_round (cx1 * zoomf);
+  cx2= (SI) tm_round (cx2 * zoomf);
+  cy1= (SI) tm_round (cy1 * zoomf);
+  cy2= (SI) tm_round (cy2 * zoomf);
   zoomf  = zoom;
-  shrinkf= (int) ::round (std_shrinkf / zoomf);
-  pixel  = (SI)  ::round ((std_shrinkf * PIXEL) / zoomf);
+  shrinkf= (int) tm_round (std_shrinkf / zoomf);
+  pixel  = (SI)  tm_round ((std_shrinkf * PIXEL) / zoomf);
   thicken= (shrinkf >> 1) * PIXEL;
-  ox = (SI) ::round (ox  / zoomf);
-  oy = (SI) ::round (oy  / zoomf);
+  ox = (SI) tm_round (ox  / zoomf);
+  oy = (SI) tm_round (oy  / zoomf);
   //cx1= (SI) ::floor (cx1 / zoomf);
   //cx2= (SI) ::floor (cx2 / zoomf);
   //cy1= (SI) ::ceil  (cy1 / zoomf);
   //cy2= (SI) ::ceil  (cy2 / zoomf);
-  cx1= (SI) ::round (cx1 / zoomf);
-  cx2= (SI) ::round (cx2 / zoomf);
-  cy1= (SI) ::round (cy1 / zoomf);
-  cy2= (SI) ::round (cy2 / zoomf);
+  cx1= (SI) tm_round (cx1 / zoomf);
+  cx2= (SI) tm_round (cx2 / zoomf);
+  cy1= (SI) tm_round (cy1 / zoomf);
+  cy2= (SI) tm_round (cy2 / zoomf);
 }
 
 void
Index: src/Graphics/Fonts/math_font.cpp
===================================================================
--- src/Graphics/Fonts/math_font.cpp	(revision 6304)
+++ src/Graphics/Fonts/math_font.cpp	(working copy)
@@ -78,7 +78,7 @@
   tree t= font_name [fn_nr];
   if (is_tuple (t, "virtual", 3))
     fn= virtual_font (this, as_string (t[1]), as_int (t[2]),
-		      (int) round (as_int (t[3]) * zf));
+		      (int) tm_round (as_int (t[3]) * zf));
   else
     fn= find_magnified_font (t, zf);
   ASSERT (!is_nil (fn), "font not found");
Index: src/Graphics/Fonts/font.cpp
===================================================================
--- src/Graphics/Fonts/font.cpp	(revision 6304)
+++ src/Graphics/Fonts/font.cpp	(working copy)
@@ -88,23 +88,23 @@
     SI     old_pixel  = ren->pixel;
     SI     old_thicken= ren->thicken;
 
-    ren->ox     = (SI) ::round (old_ox  * old_zoomf);
-    ren->oy     = (SI) ::round (old_oy  * old_zoomf);
+    ren->ox     = (SI) tm_round (old_ox  * old_zoomf);
+    ren->oy     = (SI) tm_round (old_oy  * old_zoomf);
     //ren->cx1    = (SI) ::floor (old_cx1 * old_zoomf);
     //ren->cx2    = (SI) ::floor (old_cx2 * old_zoomf);
     //ren->cy1    = (SI) ::ceil  (old_cy1 * old_zoomf);
     //ren->cy2    = (SI) ::ceil  (old_cy2 * old_zoomf);
-    ren->cx1    = (SI) ::round (old_cx1 * old_zoomf);
-    ren->cx2    = (SI) ::round (old_cx2 * old_zoomf);
-    ren->cy1    = (SI) ::round (old_cy1 * old_zoomf);
-    ren->cy2    = (SI) ::round (old_cy2 * old_zoomf);
+    ren->cx1    = (SI) tm_round (old_cx1 * old_zoomf);
+    ren->cx2    = (SI) tm_round (old_cx2 * old_zoomf);
+    ren->cy1    = (SI) tm_round (old_cy1 * old_zoomf);
+    ren->cy2    = (SI) tm_round (old_cy2 * old_zoomf);
     ren->zoomf  = 1.0;
     ren->shrinkf= std_shrinkf;
     ren->pixel  = std_shrinkf * PIXEL;
     ren->thicken= (std_shrinkf >> 1) * PIXEL;
 
-    SI xx= (SI) round (x * old_zoomf);
-    SI yy= (SI) round (y * old_zoomf);
+    SI xx= (SI) tm_round (x * old_zoomf);
+    SI yy= (SI) tm_round (y * old_zoomf);
     zoomed_fn->draw_fixed (ren, s, xx, yy);
 
     ren->ox     = old_ox;
Index: src/Graphics/Fonts/compound_font.cpp
===================================================================
--- src/Graphics/Fonts/compound_font.cpp	(revision 6304)
+++ src/Graphics/Fonts/compound_font.cpp	(working copy)
@@ -59,7 +59,7 @@
     tree t= def[ch][1];
     if (is_tuple (t, "virtual", 3))
       fn[ch]= virtual_font (this, as_string (t[1]), as_int (t[2]),
-			    (int) round (as_int (t[3]) * zf));
+			    (int) tm_round (as_int (t[3]) * zf));
     else
       fn[ch]= find_magnified_font (t, zf);
     ASSERT (!is_nil (fn[ch]), "font not found");
Index: src/Graphics/Fonts/virtual_font.cpp
===================================================================
--- src/Graphics/Fonts/virtual_font.cpp	(revision 6304)
+++ src/Graphics/Fonts/virtual_font.cpp	(working copy)
@@ -295,7 +295,7 @@
 font
 virtual_font_rep::magnify (double zoom) {
   return virtual_font (base_fn->magnify (zoom), fn_name,
-		       size, (int) round (dpi * zoom));
+		       size, (int) tm_round (dpi * zoom));
 }
 
 glyph
Index: src/Kernel/Abstractions/basic.hpp
===================================================================
--- src/Kernel/Abstractions/basic.hpp	(revision 6304)
+++ src/Kernel/Abstractions/basic.hpp	(working copy)
@@ -104,6 +104,7 @@
   return ((int) ((intptr_t) ptr)) + (((int) ((intptr_t) ptr)) % 19); }
 inline int copy (int x) { return x; }
 inline SI as_int (double x) { return (SI) floor (x + 0.5); }
+inline double tm_round (double x) { return floor (x + 0.5); }
 
 enum display_control { INDENT, UNINDENT, HRULE, LF };
 tm_ostream& operator << (tm_ostream& out, display_control ctrl);
Index: src/Style/Evaluate/evaluate_length.cpp
===================================================================
--- src/Style/Evaluate/evaluate_length.cpp	(revision 6304)
+++ src/Style/Evaluate/evaluate_length.cpp	(working copy)
@@ -311,7 +311,7 @@
 tree evaluate_tmpt_length () {
   return tree (TMLEN, "1"); }
 tree evaluate_px_length () {
-  int px= (int) round ((std_shrinkf * PIXEL) / std_zoom ());
+  int px= (int) tm_round ((std_shrinkf * PIXEL) / std_zoom ());
   return tree (TMLEN, as_string (px)); }
 
 tree
Index: src/Plugins/Freetype/unicode_font.cpp
===================================================================
--- src/Plugins/Freetype/unicode_font.cpp	(revision 6304)
+++ src/Plugins/Freetype/unicode_font.cpp	(working copy)
@@ -292,7 +292,7 @@
 
 font
 unicode_font_rep::magnify (double zoom) {
-  return unicode_font (family, size, (int) round (dpi * zoom));
+  return unicode_font (family, size, (int) tm_round (dpi * zoom));
 }
 
 glyph
Index: src/Plugins/Freetype/tt_font.cpp
===================================================================
--- src/Plugins/Freetype/tt_font.cpp	(revision 6304)
+++ src/Plugins/Freetype/tt_font.cpp	(working copy)
@@ -176,7 +176,7 @@
 
 font
 tt_font_rep::magnify (double zoom) {
-  return tt_font (family, size, (int) round (dpi * zoom));
+  return tt_font (family, size, (int) tm_round (dpi * zoom));
 }
 
 glyph
Index: src/Plugins/X11/x_font.cpp
===================================================================
--- src/Plugins/X11/x_font.cpp	(revision 6304)
+++ src/Plugins/X11/x_font.cpp	(working copy)
@@ -414,7 +414,7 @@
 
 font
 x_font_rep::magnify (double zoom) {
-  return x_font (family, size, (int) round (dpi * zoom));
+  return x_font (family, size, (int) tm_round (dpi * zoom));
 }
 
 glyph
Index: src/Plugins/Metafont/tex_font.cpp
===================================================================
--- src/Plugins/Metafont/tex_font.cpp	(revision 6304)
+++ src/Plugins/Metafont/tex_font.cpp	(working copy)
@@ -657,7 +657,7 @@
 
 font
 tex_font_rep::magnify (double zoom) {
-  int ndpi= (int) round (dpi * zoom);
+  int ndpi= (int) tm_round (dpi * zoom);
   switch (status) {
   case TEX_ANY:
     return tex_font (family, size, ndpi, dsize);
Index: src/Plugins/Metafont/tex_rubber_font.cpp
===================================================================
--- src/Plugins/Metafont/tex_rubber_font.cpp	(revision 6304)
+++ src/Plugins/Metafont/tex_rubber_font.cpp	(working copy)
@@ -249,7 +249,7 @@
 
 font
 tex_rubber_font_rep::magnify (double zoom) {
-  int ndpi= (int) round (dpi * zoom);
+  int ndpi= (int) tm_round (dpi * zoom);
   return tex_rubber_font (trl, family, size, ndpi, dsize);
 }
 
Index: src/Edit/Interface/edit_interface.cpp
===================================================================
--- src/Edit/Interface/edit_interface.cpp	(revision 6304)
+++ src/Edit/Interface/edit_interface.cpp	(working copy)
@@ -51,7 +51,7 @@
   message_l (""), message_r (""), last_l (""), last_r (""),
   zoomf (sv->get_default_zoom_factor ()),
   magf (zoomf / std_shrinkf),
-  pixel (::round ((std_shrinkf * PIXEL) / zoomf)), copy_always (),
+  pixel ((SI) tm_round ((std_shrinkf * PIXEL) / zoomf)), copy_always (),
   last_x (0), last_y (0), last_t (0),
   made_selection (false), table_selection (false), mouse_adjusting(false),
   oc (0, 0), temp_invalid_cursor (false),
@@ -117,7 +117,7 @@
 edit_interface_rep::set_zoom_factor (double zoom) {
   zoomf = zoom;
   magf  = zoomf / std_shrinkf;
-  pixel = (int) ::round ((std_shrinkf * PIXEL) / zoomf);
+  pixel = (int) tm_round ((std_shrinkf * PIXEL) / zoomf);
 }
 
 void
Index: src/Typeset/Env/env_semantics.cpp
===================================================================
--- src/Typeset/Env/env_semantics.cpp	(revision 6304)
+++ src/Typeset/Env/env_semantics.cpp	(working copy)
@@ -551,7 +551,7 @@
 void
 edit_env_rep::update () {
   zoomf          = normal_zoom (get_double (ZOOM_FACTOR));
-  pixel          = ::round ((std_shrinkf * PIXEL) / zoomf);
+  pixel          = (SI) tm_round ((std_shrinkf * PIXEL) / zoomf);
   magn           = get_double (MAGNIFICATION);
   index_level    = get_int (MATH_LEVEL);
   display_style  = get_bool (MATH_DISPLAY);
@@ -594,7 +594,7 @@
     break;
   case Env_Zoom:
     zoomf= normal_zoom (get_double (ZOOM_FACTOR));
-    pixel= ::round ((std_shrinkf * PIXEL) / zoomf);
+    pixel= (SI) tm_round ((std_shrinkf * PIXEL) / zoomf);
     break;
   case Env_Magnification:
     magn= get_double (MAGNIFICATION);
