Index: src/HelpView.cxx
===================================================================
--- src/HelpView.cxx	(revision 5750)
+++ src/HelpView.cxx	(working copy)
@@ -73,7 +73,9 @@
 #  include <direct.h>
 // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
 // on Windows, which is supposed to be POSIX compliant...
-#  define getcwd _getcwd
+#  if defined(_MSC_VER)
+#    define getcwd _getcwd
+#  endif
 #else
 #  include <unistd.h>
 #endif // WIN32
Index: src/AnsiWidget.cxx
===================================================================
--- src/AnsiWidget.cxx	(revision 5750)
+++ src/AnsiWidget.cxx	(working copy)
@@ -138,7 +138,7 @@
     GSave gsave;
     img->make_current();
     setcolor(color());
-    fillrect(Rectangle(w(), h()));
+    fillrect(fltk::Rectangle(w(), h()));
     setfont(labelfont(), labelsize());
   }
 }
@@ -203,18 +203,18 @@
       img->make_current();
       setcolor(color());
       setfont(labelfont(), labelsize());
-      fillrect(Rectangle(W, H));
-      old->draw(Rectangle(old->w(), old->h()));
+      fillrect(fltk::Rectangle(W, H));
+      old->draw(fltk::Rectangle(old->w(), old->h()));
       old->destroy();
       delete old;
       resized = false;
     }
-    push_clip(Rectangle(w(), h()));
-    img->draw(Rectangle(img->w(), img->h()));
+    push_clip(fltk::Rectangle(w(), h()));
+    img->draw(fltk::Rectangle(img->w(), img->h()));
     pop_clip();
   } else {
     setcolor(color());
-    fillrect(Rectangle(w(), h()));
+    fillrect(fltk::Rectangle(w(), h()));
   }
 }
 
@@ -225,7 +225,7 @@
     init();
     begin_offscreen();
     setcolor(color());
-    fillrect(Rectangle(w(), h()));
+    fillrect(fltk::Rectangle(w(), h()));
     redraw();
   }
 }
@@ -257,7 +257,7 @@
 void AnsiWidget::drawRectFilled(int x1, int y1, int x2, int y2) {
   begin_offscreen();
   setcolor(labelcolor());
-  fillrect(Rectangle(x1, y1, x2-x1, y2-y1));
+  fillrect(fltk::Rectangle(x1, y1, x2-x1, y2-y1));
   redraw();
 }
 
@@ -278,8 +278,8 @@
 void AnsiWidget::drawImage(Image* image, int x, int y, int sx, int sy, 
                            int width, int height) {
   begin_offscreen();
-  image->draw(Rectangle(sx, sy, width, height), // from
-              Rectangle(x, y, width, height)); // to
+  image->draw(fltk::Rectangle(sx, sy, width, height), // from
+              fltk::Rectangle(x, y, width, height)); // to
   redraw();
 }
 
@@ -295,7 +295,7 @@
   }
   uchar* pixels = (uchar*)malloc(width*height*3);
   begin_offscreen();
-  readimage(pixels, RGB, Rectangle(x,y,width,height));
+  readimage(pixels, RGB, fltk::Rectangle(x,y,width,height));
   fltk::rgbImage jpg(pixels, RGB, width, height);
   //jpg.write_jpeg(filename);
   //TODO: re-enable jpeg write function
@@ -385,7 +385,7 @@
 
   curX = INITXY;
   if (curY+(fontHeight*2) >= height) {
-    scrollrect(Rectangle(w(), height), 0, -fontHeight, eraseBottomLine, this);
+    scrollrect(fltk::Rectangle(w(), height), 0, -fontHeight, eraseBottomLine, this);
   } else {
     curY += fontHeight;
   }
@@ -424,7 +424,7 @@
   switch (c) {
   case 'K': // \e[K - clear to eol
     setcolor(color());
-    fillrect(Rectangle(curX, curY, w()-curX, (int)(getascent()+getdescent())));
+    fillrect(fltk::Rectangle(curX, curY, w()-curX, (int)(getascent()+getdescent())));
     break;
   case 'G': // move to column
     curX = escValue;
@@ -588,7 +588,7 @@
     case '\xC':
       init();
       setcolor(color());
-      fillrect(Rectangle(w(), h()));
+      fillrect(fltk::Rectangle(w(), h()));
       break;
     case '\033':  // ESC ctrl chars
       if (*(p+1) == '[' ) {
@@ -606,7 +606,7 @@
     case '\r': // return
       curX = INITXY;
       setcolor(color());
-      fillrect(Rectangle(0, curY, w(), fontHeight));
+      fillrect(fltk::Rectangle(0, curY, w(), fontHeight));
       break;
     default:
       int numChars = 1; // print minimum of one character
@@ -630,12 +630,12 @@
             
       if (invert) {
         setcolor(labelcolor());
-        fillrect(Rectangle(curX, curY, cx, fontHeight));
+        fillrect(fltk::Rectangle(curX, curY, cx, fontHeight));
         setcolor(color());
         drawtext((const char*)p, numChars, curX, curY+ascent);
       } else {
         setcolor(color());
-        fillrect(Rectangle(curX, curY, cx, fontHeight));
+        fillrect(fltk::Rectangle(curX, curY, cx, fontHeight));
         setcolor(labelcolor());
         drawtext((const char*)p, numChars, curX, curY+ascent);
       }
Index: src/filename_absolute.cxx
===================================================================
--- src/filename_absolute.cxx	(revision 5750)
+++ src/filename_absolute.cxx	(working copy)
@@ -26,7 +26,7 @@
 # include <direct.h>
 // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
 // on Windows, which is supposed to be POSIX compliant...
-#  if !defined(__DMC__)
+#  if defined(_MSC_VER)
 #    define getcwd _getcwd
 #  endif
 #else
Index: src/win32/list_fonts.cxx
===================================================================
--- src/win32/list_fonts.cxx	(revision 5750)
+++ src/win32/list_fonts.cxx	(working copy)
@@ -91,7 +91,7 @@
   if (has_unicode()) {
     wchar_t ucs[1024];
     utf8towc(name_, strlen(name_), ucs, 1024);
-#if defined(__BORLANDC__) || defined(__DMC__)
+#if defined(__DMC__)
     EnumFontFamiliesW(dc, ucs, (FONTENUMPROCA)EnumSizeCb, 0);
 #else
     EnumFontFamiliesW(dc, ucs, EnumSizeCb, 0);
Index: src/win32/run.cxx
===================================================================
--- src/win32/run.cxx	(revision 5750)
+++ src/win32/run.cxx	(working copy)
@@ -61,7 +61,7 @@
 
 // FIXME - Following block fixes weird problem with compiling FLTK
 //   inside Visual C++ (.NET 2003 Enterprise Architect)
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BORLANDC__)
 # define IN
 # define OUT
 #endif
Index: src/Preferences.cxx
===================================================================
--- src/Preferences.cxx	(revision 5750)
+++ src/Preferences.cxx	(working copy)
@@ -41,7 +41,9 @@
 #  include <io.h>
 // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
 // on Windows, which is supposed to be POSIX compliant...
-#  define access _access
+#  if defined(_MSC_VER)
+#    define access _access
+#  endif
 #  define mkdir _mkdir
 #elif defined (__APPLE__)
 #  include <Carbon/Carbon.h>
Index: src/FileChooser2.cxx
===================================================================
--- src/FileChooser2.cxx	(revision 5750)
+++ src/FileChooser2.cxx	(working copy)
@@ -67,8 +67,10 @@
 #  include <io.h>
 // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
 // on Windows, which is supposed to be POSIX compliant...
-#  define access _access
-#  define mkdir _mkdir
+#  if defined(_MSC_VER)
+#    define access _access
+#    define mkdir _mkdir
+#  endif
 // Apparently Borland C++ defines DIRECTORY in <direct.h>, which
 // interfers with the FileIcon enumeration of the same name.
 #  ifdef DIRECTORY
Index: test/drawtiming.cxx
===================================================================
--- test/drawtiming.cxx	(revision 5750)
+++ test/drawtiming.cxx	(working copy)
@@ -60,7 +60,7 @@
 	drawtext(buffer,X+3,Y+16);
       }
       pop_clip();
-      clipout(Rectangle(X,Y,W,H));
+      clipout(fltk::Rectangle(X,Y,W,H));
     }
     setcolor(GRAY75);
     fillrect(0,0,w(),h());
Index: test/image.cxx
===================================================================
--- test/image.cxx	(revision 5750)
+++ test/image.cxx	(working copy)
@@ -105,7 +105,7 @@
 #include "porsche.xpm"
 class Xtest : public Widget {
 public:
-  Xtest(int x, int y, const char* l, const char* const* data)
+  Xtest(int x, int y, char * l, char ** data)
     : Widget(x,y,16*SCALE,16*SCALE,l) {
     box(new xpmImage(data,0));
     align(ALIGN_BOTTOM|ALIGN_CLIP);
Index: test/checkers.cxx
===================================================================
--- test/checkers.cxx	(revision 5750)
+++ test/checkers.cxx	(working copy)
@@ -1024,8 +1024,8 @@
     dragging = ::b[i];
   }
   if (dx != dragx || dy != dragy) {
-    redraw(Rectangle(dragx, dragy, ISIZE, ISIZE));
-    redraw(Rectangle(dx, dy, ISIZE, ISIZE));
+    redraw(fltk::Rectangle(dragx, dragy, ISIZE, ISIZE));
+    redraw(fltk::Rectangle(dx, dy, ISIZE, ISIZE));
   }
   dragx = dx;
   dragy = dy;
@@ -1039,8 +1039,8 @@
   int x = squarex(i);
   int y = squarey(i);
   if (x != dragx || y != dragy) {
-    redraw(Rectangle(dragx, dragy, ISIZE, ISIZE));
-    redraw(Rectangle(x, y, ISIZE, ISIZE));
+    redraw(fltk::Rectangle(dragx, dragy, ISIZE, ISIZE));
+    redraw(fltk::Rectangle(x, y, ISIZE, ISIZE));
   }
 }
 
@@ -1123,7 +1123,7 @@
     case fltk::SHORTCUT:
       return busymenu->test_shortcut() != 0;
     default:
-      return Window::handle(e);
+      return fltk::Window::handle(e);
     }
   }
   node *t, *n;
@@ -1143,7 +1143,7 @@
       for (t = root->son; t; t = t->brother) {
 	int x = squarex(t->from);
 	int y = squarey(t->from);
-	if (fltk::event_inside(Rectangle(x,y,BOXSIZE,BOXSIZE))) {
+	if (fltk::event_inside(fltk::Rectangle(x,y,BOXSIZE,BOXSIZE))) {
 	  deltax = fltk::event_x()-x;
 	  deltay = fltk::event_y()-y;
 	  drag_piece(t->from,x,y);
@@ -1175,7 +1175,7 @@
     computer_move(0);
     return 1;
   default:
-    return Window::handle(e);
+    return fltk::Window::handle(e);
   }
 }
 
Index: test/mandelbrot.cxx
===================================================================
--- test/mandelbrot.cxx	(revision 5750)
+++ test/mandelbrot.cxx	(working copy)
@@ -184,7 +184,7 @@
     }
     return 1;
   default:
-    return Widget::handle(event);
+    return fltk::Widget::handle(event);
   }
 }
 
Index: test/CubeView.cxx
===================================================================
--- test/CubeView.cxx	(revision 5750)
+++ test/CubeView.cxx	(working copy)
@@ -28,7 +28,7 @@
 
 #if HAVE_GL
 CubeView::CubeView(int x,int y,int w,int h,const char *l)
-            : GlWindow(x,y,w,h,l)
+            : fltk::GlWindow(x,y,w,h,l)
 #else
 CubeView::CubeView(int x,int y,int w,int h,const char *l)
             : Widget(x,y,w,h,l)
Index: fluid/alignment_panel.cxx
===================================================================
--- fluid/alignment_panel.cxx	(revision 5750)
+++ fluid/alignment_panel.cxx	(working copy)
@@ -205,7 +205,7 @@
 fltk::Input *shell_command_input=(fltk::Input *)0;
 
 static void cb_shell_command_input(fltk::Input*, void*) {
-  prefs.shell_command(shell_command_input->value());
+  //prefs.shell_command(shell_command_input->value());
 }
 
 fltk::CheckButton *shell_writecode_button=(fltk::CheckButton *)0;
@@ -250,7 +250,7 @@
       o->labelfont(fltk::HELVETICA_BOLD);
       o->callback((fltk::Callback*)cb_shell_command_input);
       o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
-      shell_command_input->value(prefs.shell_command());
+      //shell_command_input->value(prefs.shell_command());
     }
      {fltk::CheckButton* o = shell_writecode_button = new fltk::CheckButton(127, 61, 93, 19, "Write Code");
       o->callback((fltk::Callback*)cb_shell_writecode_button);
Index: fluid/PrefsData.h
===================================================================
--- fluid/PrefsData.h	(revision 5750)
+++ fluid/PrefsData.h	(working copy)
@@ -73,7 +73,6 @@
     FluidProperty(int, prev_window_pos,"prev_window_pos");
     FluidProperty(int, show_completion_dialogs,"show_completion_dialogs");
     FluidProperty(int, recent_files,"recent_files");
-    FluidPropVect(char, 1024, shell_command,"shell_command");
     FluidProperty(int, shell_writecode,"shell_writecode");
     FluidProperty(int, shell_writemsgs,"shell_writemsgs");
     FluidProperty(int, shell_savefl,"shell_savefl");
@@ -89,6 +88,8 @@
     FluidPropertyGroup("tabs", int, tabcolor2,"tabcolor2");
     FluidPropertyGroup("tabs", int, tabcolor3,"tabcolor3");
 
+//    FluidPropVect(char, 1024, shell_command,"shell_command");
+
     // 2. initialize your persistent property here
     void get_all_properties() {
       get("gridx",gridx_, 5);
@@ -99,7 +100,7 @@
       get("prev_window_pos", prev_window_pos_, 1);
       get("show_completion_dialogs", show_completion_dialogs_, 1);
       get("recent_files", recent_files_, 5);
-      get("shell_command", shell_command_, "", sizeof(shell_command_));
+//      get("shell_command", shell_command_, "", sizeof(shell_command_));
       get("shell_writecode", shell_writecode_, 1);
       get("shell_writemsgs", shell_writemsgs_, 0);
       get("shell_savefl", shell_savefl_, 1);
@@ -126,7 +127,7 @@
 
 public:
     PrefsData( Root root, const char *vendor, const char *application ):
-	Preferences(root, vendor, application) {init();}
+	fltk::Preferences(root, vendor, application) {init();}
     //!avoid saving in the prefs when writing (for per-file prefs purpose)
     void autosave(bool a) {autosave_=a;}
 };
