Index: FL/Fl_Menu_Item.H
===================================================================
--- FL/Fl_Menu_Item.H	(revision 10271)
+++ FL/Fl_Menu_Item.H	(working copy)
@@ -240,7 +240,7 @@
     for the menu item's callback function.
     \see Fl_Callback_p Fl_MenuItem::callback() const
    */
-  void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;}
+  void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)(fl_intptr_t)p;}
 
   /**
     Gets the user_data() argument that is sent to the callback function.
@@ -264,7 +264,7 @@
     and stores it in the menu item's userdata() member.
     This may not be portable to some machines.
   */
-  void argument(long v) {user_data_ = (void*)v;}
+  void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
 
   /** Gets what key combination shortcut will trigger the menu item. */
   int shortcut() const {return shortcut_;}
@@ -388,7 +388,7 @@
     the callback.
     You must first check that callback() is non-zero before calling this.
   */
-  void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);}
+  void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);}
 
   // back-compatibility, do not use:
 
Index: FL/Fl_Value_Slider.H
===================================================================
--- FL/Fl_Value_Slider.H	(revision 10271)
+++ FL/Fl_Value_Slider.H	(working copy)
@@ -34,6 +34,7 @@
     Fl_Font textfont_;
     Fl_Fontsize textsize_;
     Fl_Color textcolor_;
+    short textwidth_, textheight_;
 protected:
     void draw();
 public:
@@ -51,6 +52,14 @@
     Fl_Color textcolor() const {return textcolor_;}
     /**    Sets the color of the text in the value box.  */
     void textcolor(Fl_Color s) {textcolor_ = s;}
+    /**    Sets the width of the text box in pixels (horizontal mode only).  */
+    void textwidth(int s) {textwidth_ = (short)s;}
+    /**    Gets the width of the text box in pixels (horizontal mode only).  */
+    int textwidth() const {return(textwidth_);}
+    /**    Sets the height of the text box in pixels (vertical mode only).  */
+    void textheight(int s) {textheight_ = (short)s;}
+    /**    Gets the height of the text box in pixels (vertical mode only).  */
+    int textheight() const {return(textheight_);}    
 };
 
 #endif
Index: FL/Fl_Widget.H
===================================================================
--- FL/Fl_Widget.H	(revision 10271)
+++ FL/Fl_Widget.H	(working copy)
@@ -573,7 +573,7 @@
       \param[in] cb new callback
       \param[in] p user data
    */
-  void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)p;}
+  void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)(fl_intptr_t)p;}
 
   /** Gets the user data for this widget.
       Gets the current user data (void *) argument that is passed to the callback function.
@@ -595,7 +595,7 @@
       \todo The user data value must be implemented using \em intptr_t or similar
       to avoid 64-bit machine incompatibilities.
    */
-  void argument(long v) {user_data_ = (void*)v;}
+  void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
 
   /** Returns the conditions under which the callback is called.
 
@@ -833,7 +833,7 @@
       \param[in] arg call the callback with \p arg as the user data argument
       \see callback()
    */
-  void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)arg);}
+  void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)(fl_intptr_t)arg);}
 
   // Causes a widget to invoke its callback function with arbitrary arguments.
   // Documentation and implementation in Fl_Widget.cxx
Index: FL/glut.H
===================================================================
--- FL/glut.H	(revision 10271)
+++ FL/glut.H	(working copy)
@@ -233,11 +233,7 @@
 
 // Warning: this cast may not work on all machines:
 inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) {
-#if defined(__LP64__)
-  Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *) (long long) value);
-#else
-  Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);
-#endif
+  Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)(fl_intptr_t)value);
 }
 
 inline void glutMenuStateFunc(void (*f)(int state)) {
Index: fluid/Fl_Menu_Type.cxx
===================================================================
--- fluid/Fl_Menu_Type.cxx	(revision 10271)
+++ fluid/Fl_Menu_Type.cxx	(working copy)
@@ -281,14 +281,14 @@
 
 void Fl_Menu_Item_Type::write_item() {
   static const char * const labeltypes[] = {
-    "FL_NORMAL_LABEL",
-    "FL_NO_LABEL",
-    "FL_SHADOW_LABEL",
-    "FL_ENGRAVED_LABEL",
-    "FL_EMBOSSED_LABEL",
-    "FL_MULTI_LABEL",
-    "FL_ICON_LABEL",
-    "FL_IMAGE_LABEL"
+    "(uchar)FL_NORMAL_LABEL",
+    "(uchar)FL_NO_LABEL",
+    "(uchar)FL_SHADOW_LABEL",
+    "(uchar)FL_ENGRAVED_LABEL",
+    "(uchar)FL_EMBOSSED_LABEL",
+    "(uchar)FL_MULTI_LABEL",
+    "(uchar)FL_ICON_LABEL",
+    "(uchar)FL_IMAGE_LABEL"
   };
 
   write_c(" {");
Index: fluid/Fl_Widget_Type.cxx
===================================================================
--- fluid/Fl_Widget_Type.cxx	(revision 10271)
+++ fluid/Fl_Widget_Type.cxx	(working copy)
@@ -2163,6 +2163,7 @@
   indentation += 2;
 
   if (wused) write_c("%sw = o;\n", indent());
+  if (wused) write_c("%so = w;\n", indent());
 
   write_widget_code();
 }
Index: src/Fl_Preferences.cxx
===================================================================
--- src/Fl_Preferences.cxx	(revision 10271)
+++ src/Fl_Preferences.cxx	(working copy)
@@ -1317,7 +1317,7 @@
 	for ( cnt = 0; cnt < 80; cnt++ )
 	  if ( src[cnt]==0 ) break;
         fputc( '+', f );
-	written = fwrite( src, cnt, 1, f );
+	written += fwrite( src, cnt, 1, f );
         fputc( '\n', f );
 	src += cnt;
       }
Index: src/Fl_Text_Display.cxx
===================================================================
--- src/Fl_Text_Display.cxx	(revision 10271)
+++ src/Fl_Text_Display.cxx	(working copy)
@@ -3674,7 +3674,7 @@
                  text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
                  text_area.h);
 
-    int X, Y;
+    int X = 0, Y = 0;
     if (position_to_xy(mCursorPos, &X, &Y)) {
       draw_cursor(X, Y);
       mCursorOldY = Y;
Index: src/Fl_Value_Slider.cxx
===================================================================
--- src/Fl_Value_Slider.cxx	(revision 10271)
+++ src/Fl_Value_Slider.cxx	(working copy)
@@ -32,15 +32,17 @@
   textfont_ = FL_HELVETICA;
   textsize_ = 10;
   textcolor_ = FL_FOREGROUND_COLOR;
+  textwidth_ = 35;
+  textheight_ = 25;
 }
 
 void Fl_Value_Slider::draw() {
   int sxx = x(), syy = y(), sww = w(), shh = h();
   int bxx = x(), byy = y(), bww = w(), bhh = h();
   if (horizontal()) {
-    bww = 35; sxx += 35; sww -= 35;
+    bww = textwidth(); sxx += textwidth(); sww -= textwidth();
   } else {
-    syy += 25; bhh = 25; shh -= 25;
+    syy += textheight(); bhh = textheight(); shh -= textheight();
   }
   if (damage()&FL_DAMAGE_ALL) draw_box(box(),sxx,syy,sww,shh,color());
   Fl_Slider::draw(sxx+Fl::box_dx(box()),
@@ -62,9 +64,9 @@
   }
   int sxx = x(), syy = y(), sww = w(), shh = h();
   if (horizontal()) {
-    sxx += 35; sww -= 35;
+    sxx += textwidth(); sww -= textwidth();
   } else {
-    syy += 25; shh -= 25;
+    syy += textheight(); shh -= textheight();
   }
   return Fl_Slider::handle(event,
 			   sxx+Fl::box_dx(box()),
Index: src/fl_boxtype.cxx
===================================================================
--- src/fl_boxtype.cxx	(revision 10271)
+++ src/fl_boxtype.cxx	(working copy)
@@ -293,6 +293,14 @@
   {fl_down_box,		1,1,2,2,0}, // _FL_GTK_THIN_ROUND_DOWN_BOX,
   {fl_up_box,		2,2,4,4,0}, // _FL_GTK_ROUND_UP_BOX,
   {fl_down_box,		2,2,4,4,0}, // _FL_GTK_ROUND_DOWN_BOX,
+  {fl_up_box,		2,2,3,3,0}, // _FL_GLEAM_UP_BOX,
+  {fl_down_box,		2,2,3,3,0}, // _FL_GLEAM_DOWN_BOX,
+  {fl_up_frame,		2,2,3,3,0}, // _FL_GLEAM_UP_FRAME,
+  {fl_down_frame,	2,2,3,3,0}, // _FL_GLEAM_DOWN_FRAME,
+  {fl_up_box,		1,1,1,1,0}, // _FL_GLEAM_THIN_UP_BOX,
+  {fl_down_box,		1,1,1,1,0}, // _FL_GLEAM_THIN_DOWN_BOX,
+  {fl_up_box,		2,2,3,3,0}, // _FL_GLEAM_ROUND_UP_BOX,
+  {fl_down_box,		2,2,3,3,0}, // _FL_GLEAM_ROUND_DOWN_BOX,
   {fl_up_box,		3,3,6,6,0}, // FL_FREE_BOX+0
   {fl_down_box,		3,3,6,6,0}, // FL_FREE_BOX+1
   {fl_up_box,		3,3,6,6,0}, // FL_FREE_BOX+2
Index: src/fl_draw_image_win32.cxx
===================================================================
--- src/fl_draw_image_win32.cxx	(revision 10271)
+++ src/fl_draw_image_win32.cxx	(working copy)
@@ -143,11 +143,12 @@
   } else
 #endif
   if (depth<3) {
+    RGBQUAD *colors = bmi.bmiColors;
     for (int i=0; i<256; i++) {
-      bmi.bmiColors[i].rgbBlue = (uchar)i;
-      bmi.bmiColors[i].rgbGreen = (uchar)i;
-      bmi.bmiColors[i].rgbRed = (uchar)i;
-      bmi.bmiColors[i].rgbReserved = (uchar)0; // must be zero
+      colors[i].rgbBlue = (uchar)i;
+      colors[i].rgbGreen = (uchar)i;
+      colors[i].rgbRed = (uchar)i;
+      colors[i].rgbReserved = (uchar)0; // must be zero
     }
   }
   bmi.bmiHeader.biWidth = w;
Index: src/makedepend
===================================================================
--- src/makedepend	(revision 10271)
+++ src/makedepend	(working copy)
@@ -405,10 +405,10 @@
 Fl_Printer.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
 Fl_Printer.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_File_Input.H
 Fl_Printer.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
-Fl_Printer.o: Fl_Font.H Xutf8.h print_panel.cxx print_panel.h
-Fl_Printer.o: ../FL/Fl_Round_Button.H ../FL/Fl_Spinner.H
-Fl_Printer.o: ../FL/Fl_Repeat_Button.H ../FL/Fl_Progress.H ../src/flstring.h
-Fl_Printer.o: ../FL/Fl_Export.H ../FL/Fl_Int_Input.H ../FL/Fl_Input.H
+Fl_Printer.o: print_panel.cxx print_panel.h ../FL/Fl_Round_Button.H
+Fl_Printer.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl_Progress.H
+Fl_Printer.o: ../src/flstring.h ../FL/Fl_Export.H ../FL/Fl_Int_Input.H
+Fl_Printer.o: ../FL/Fl_Input.H
 Fl_Progress.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
 Fl_Progress.o: ../FL/Enumerations.H ../FL/Fl_Progress.H ../FL/Fl_Widget.H
 Fl_Progress.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
@@ -1199,7 +1199,7 @@
 Fl_PNM_Image.o: ../FL/Enumerations.H ../FL/Fl_PNM_Image.H ../FL/Fl_Image.H
 Fl_PNM_Image.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
 flstring.o: flstring.h ../FL/Fl_Export.H ../config.h
-scandir.o: ../config.h
+scandir.o: ../config.h scandir_posix.c
 numericsort.o: ../config.h ../FL/filename.H
 vsnprintf.o: flstring.h ../FL/Fl_Export.H ../config.h
 fl_utf.o: ../FL/fl_utf8.h xutf8/mk_wcwidth.c
Index: test/arc.cxx
===================================================================
--- test/arc.cxx	(revision 10271)
+++ test/arc.cxx	(working copy)
@@ -75,11 +75,8 @@
     s->step(1);
     s->value(args[n]);
     s->align(FL_ALIGN_LEFT);
-#ifdef __LP64__
-    s->callback(slider_cb, (void*)(long long) n);
-#else
-    s->callback(slider_cb, (void*) n);
-#endif
+    s->callback(slider_cb, (void*)(fl_intptr_t)n);
+
   }
 
   window.end();
Index: test/curve.cxx
===================================================================
--- test/curve.cxx	(revision 10271)
+++ test/curve.cxx	(working copy)
@@ -91,11 +91,7 @@
     s->step(1);
     s->value(args[n]);
     s->align(FL_ALIGN_LEFT);
-#ifdef __LP64__
-    s->callback(slider_cb, (void*) (long long)n);
-#else
-    s->callback(slider_cb, (void*)n);
-#endif
+    s->callback(slider_cb, (void*)(fl_intptr_t)n);
   }
   Fl_Toggle_Button but(50,y,50,25,"points");
   but.callback(points_cb);
Index: test/forms.cxx
===================================================================
--- test/forms.cxx	(revision 10271)
+++ test/forms.cxx	(working copy)
@@ -38,26 +38,26 @@
 
 static VN_struct btypes[]=
 {
-   {FL_NO_BOX,"no box"},
-   {FL_UP_BOX, "up box"},
-   {FL_DOWN_BOX,"down box"},
-   {FL_BORDER_BOX,"border box"},
-   {FL_SHADOW_BOX,"shadow box"},
-   {FL_FLAT_BOX,"flat box"},
-   {FL_FRAME_BOX,"frame box"},
-   {FL_EMBOSSED_BOX,"embossed box"},
-   {FL_ROUNDED_BOX,"rounded box"},
-   {FL_RFLAT_BOX,"rflat box"},
-   {FL_RSHADOW_BOX,"rshadow box"}, // renamed for fltk
-   {FL_OVAL_BOX,"oval box"},
-   {FL_ROUNDED3D_UPBOX,"rounded3d upbox"},
-   {FL_ROUNDED3D_DOWNBOX,"rounded3d downbox"},
-   {FL_OVAL3D_UPBOX,"oval3d upbox"},
-   {FL_OVAL3D_DOWNBOX,"oval3d downbox"},
-   {FL_PLASTIC_UP_BOX,"plastic upbox"},
-   {FL_PLASTIC_DOWN_BOX,"plastic downbox"},
-   {FL_GTK_UP_BOX,"GTK up box"},
-   {FL_GTK_ROUND_UP_BOX,"GTK round up box"},
+   {(int)FL_NO_BOX,"no box"},
+   {(int)FL_UP_BOX, "up box"},
+   {(int)FL_DOWN_BOX,"down box"},
+   {(int)FL_BORDER_BOX,"border box"},
+   {(int)FL_SHADOW_BOX,"shadow box"},
+   {(int)FL_FLAT_BOX,"flat box"},
+   {(int)FL_FRAME_BOX,"frame box"},
+   {(int)FL_EMBOSSED_BOX,"embossed box"},
+   {(int)FL_ROUNDED_BOX,"rounded box"},
+   {(int)FL_RFLAT_BOX,"rflat box"},
+   {(int)FL_RSHADOW_BOX,"rshadow box"}, // renamed for fltk
+   {(int)FL_OVAL_BOX,"oval box"},
+   {(int)FL_ROUNDED3D_UPBOX,"rounded3d upbox"},
+   {(int)FL_ROUNDED3D_DOWNBOX,"rounded3d downbox"},
+   {(int)FL_OVAL3D_UPBOX,"oval3d upbox"},
+   {(int)FL_OVAL3D_DOWNBOX,"oval3d downbox"},
+   {(int)FL_PLASTIC_UP_BOX,"plastic upbox"},
+   {(int)FL_PLASTIC_DOWN_BOX,"plastic downbox"},
+   {(int)FL_GTK_UP_BOX,"GTK up box"},
+   {(int)FL_GTK_ROUND_UP_BOX,"GTK round up box"},
    {FL_GLEAM_UP_BOX,"Gleam up box"},
    /* sentinel */
    {-1}
Index: test/menubar.cxx
===================================================================
--- test/menubar.cxx	(revision 10271)
+++ test/menubar.cxx	(working copy)
@@ -127,10 +127,10 @@
     {"Italic",	0, 0, 0, 0, 0, FL_ITALIC, 14},
     {"BoldItalic",0,0,0, 0, 0, FL_BOLD+FL_ITALIC, 14},
     {"Small",	0, 0, 0, 0, 0, FL_BOLD+FL_ITALIC, 10},
-    {"Emboss",	0, 0, 0, 0, FL_EMBOSSED_LABEL},
-    {"Engrave",	0, 0, 0, 0, FL_ENGRAVED_LABEL},
-    {"Shadow",	0, 0, 0, 0, FL_SHADOW_LABEL},
-    {"@->",	0, 0, 0, 0, FL_SYMBOL_LABEL},
+    {"Emboss",	0, 0, 0, 0, (uchar)FL_EMBOSSED_LABEL},
+    {"Engrave",	0, 0, 0, 0, (uchar)FL_ENGRAVED_LABEL},
+    {"Shadow",	0, 0, 0, 0, (uchar)FL_SHADOW_LABEL},
+    {"@->",	0, 0, 0, 0, (uchar)FL_SYMBOL_LABEL},
     {0},
   {"&International",0,0,0,FL_SUBMENU},
     {"Sharp Ess",0x0000df},
