Index: FL/platform_types.h
===================================================================
--- FL/platform_types.h	(revision 12504)
+++ FL/platform_types.h	(working copy)
@@ -82,7 +82,12 @@
 # endif
 typedef struct HGLRC__ *GLContext;
 #include <sys/stat.h>
+
+#ifdef __WATCOMC__
+#include <direct.h>
+#else
 struct dirent {char d_name[1];};
+#endif
 
 #elif defined(FL_PORTING)
 # pragma message "FL_PORTING: define OS-dependent types"
Index: nanosvg/altsvgrast.h
===================================================================
--- nanosvg/altsvgrast.h	(revision 12504)
+++ nanosvg/altsvgrast.h	(working copy)
@@ -330,7 +330,7 @@
 
 static float nsvg__normalize(float *x, float* y)
 {
-	float d = sqrtf((*x)*(*x) + (*y)*(*y));
+	float d = sqrt((*x)*(*x) + (*y)*(*y));
 	if (d > 1e-6f) {
 		float id = 1.0f / d;
 		*x *= id;
@@ -471,7 +471,7 @@
 
 	for (i = 0; i < ncap; i++) {
 		float a = (float)i/(float)(ncap-1)*NSVG_PI;
-		float ax = cosf(a) * w, ay = sinf(a) * w;
+		float ax = cos(a) * w, ay = sin(a) * w;
 		float x = px - dlx*ax - dx*ay;
 		float y = py - dly*ax - dy*ay;
 
@@ -559,8 +559,8 @@
 	float w = lineWidth * 0.5f;
 	float dlx0 = p0->dy, dly0 = -p0->dx;
 	float dlx1 = p1->dy, dly1 = -p1->dx;
-	float a0 = atan2f(dly0, dlx0);
-	float a1 = atan2f(dly1, dlx1);
+	float a0 = atan2(dly0, dlx0);
+	float a1 = atan2(dly1, dlx1);
 	float da = a1 - a0;
 	float lx, ly, rx, ry;
 
@@ -567,7 +567,7 @@
 	if (da < NSVG_PI) da += NSVG_PI*2;
 	if (da > NSVG_PI) da -= NSVG_PI*2;
 
-	n = (int)ceilf((nsvg__absf(da) / NSVG_PI) * (float)ncap);
+	n = (int)ceil((nsvg__absf(da) / NSVG_PI) * (float)ncap);
 	if (n < 2) n = 2;
 	if (n > ncap) n = ncap;
 
@@ -579,7 +579,7 @@
 	for (i = 0; i < n; i++) {
 		float u = (float)i/(float)(n-1);
 		float a = a0 + u*da;
-		float ax = cosf(a) * w, ay = sinf(a) * w;
+		float ax = cos(a) * w, ay = sin(a) * w;
 		float lx1 = p1->x - ax, ly1 = p1->y - ay;
 		float rx1 = p1->x + ax, ry1 = p1->y + ay;
 
@@ -609,8 +609,8 @@
 
 static int nsvg__curveDivs(float r, float arc, float tol)
 {
-	float da = acosf(r / (r + tol)) * 2.0f;
-	int divs = (int)ceilf(arc / da);
+	float da = acos(r / (r + tol)) * 2.0f;
+	int divs = (int)ceil(arc / da);
 	if (divs < 2) divs = 2;
 	return divs;
 }
@@ -798,7 +798,7 @@
 			if (shape->strokeDashCount & 1)
 				allDashLen *= 2.0f;
 			// Find location inside pattern
-			dashOffset = fmodf(shape->strokeDashOffset, allDashLen);
+			dashOffset = fmod(shape->strokeDashOffset, allDashLen);
 			if (dashOffset < 0.0f)
 				dashOffset += allDashLen;
 
@@ -811,7 +811,7 @@
 			for (j = 1; j < r->npoints2; ) {
 				float dx = r->points2[j].x - cur.x;
 				float dy = r->points2[j].y - cur.y;
-				float dist = sqrtf(dx*dx + dy*dy);
+				float dist = sqrt(dx*dx + dy*dy);
 
 				if ((totalDist + dist) > dashLen) {
 					// Calculate intermediate point
@@ -882,10 +882,10 @@
 //	STBTT_assert(e->y0 <= start_point);
 	// round dx down to avoid going too far
 	if (dxdy < 0)
-		z->dx = (int)(-floorf(NSVG__FIX * -dxdy));
+		z->dx = (int)(-floor(NSVG__FIX * -dxdy));
 	else
-		z->dx = (int)floorf(NSVG__FIX * dxdy);
-	z->x = (int)floorf(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0)));
+		z->dx = (int)floor(NSVG__FIX * dxdy);
+	z->x = (int)floor(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0)));
 //	z->x -= off_x * FIX;
 	z->ey = e->y1;
 	z->next = 0;
@@ -1091,7 +1091,7 @@
 			int r,g,b,a,ia;
 			gx = fx*t[0] + fy*t[2] + t[4];
 			gy = fx*t[1] + fy*t[3] + t[5];
-			gd = sqrtf(gx*gx + gy*gy);
+			gd = sqrt(gx*gx + gy*gy);
 			c = cache->colors[(int)nsvg__clampf(gd*255.0f, 0, 255.0f)];
 			cr = (c) & 0xff;
 			cg = (c >> 8) & 0xff;
Index: nanosvg/nanosvg.h
===================================================================
--- nanosvg/nanosvg.h	(revision 12504)
+++ nanosvg/nanosvg.h	(working copy)
@@ -476,13 +476,13 @@
 static void nsvg__xformSetSkewX(float* t, float a)
 {
 	t[0] = 1.0f; t[1] = 0.0f;
-	t[2] = tanf(a); t[3] = 1.0f;
+	t[2] = tan(a); t[3] = 1.0f;
 	t[4] = 0.0f; t[5] = 0.0f;
 }
 
 static void nsvg__xformSetSkewY(float* t, float a)
 {
-	t[0] = 1.0f; t[1] = tanf(a);
+	t[0] = 1.0f; t[1] = tan(a);
 	t[2] = 0.0f; t[3] = 1.0f;
 	t[4] = 0.0f; t[5] = 0.0f;
 }
@@ -489,7 +489,7 @@
 
 static void nsvg__xformSetRotation(float* t, float a)
 {
-	float cs = cosf(a), sn = sinf(a);
+	float cs = cos(a), sn = sin(a);
 	t[0] = cs; t[1] = sn;
 	t[2] = -sn; t[3] = cs;
 	t[4] = 0.0f; t[5] = 0.0f;
@@ -776,7 +776,7 @@
 static float nsvg__actualLength(NSVGparser* p)
 {
 	float w = nsvg__actualWidth(p), h = nsvg__actualHeight(p);
-	return sqrtf(w*w + h*h) / sqrtf(2.0f);
+	return sqrt(w*w + h*h) / sqrt(2.0f);
 }
 
 static float nsvg__convertToPixels(NSVGparser* p, NSVGcoordinate c, float orig, float length)
@@ -849,7 +849,7 @@
 		sw = nsvg__actualWidth(p);
 		sh = nsvg__actualHeight(p);
 	}
-	sl = sqrtf(sw*sw + sh*sh) / sqrtf(2.0f);
+	sl = sqrt(sw*sw + sh*sh) / sqrt(2.0f);
 
 	if (data->type == NSVG_PAINT_LINEAR_GRADIENT) {
 		float x1, y1, x2, y2, dx, dy;
@@ -892,8 +892,8 @@
 
 static float nsvg__getAverageScale(float* t)
 {
-	float sx = sqrtf(t[0]*t[0] + t[2]*t[2]);
-	float sy = sqrtf(t[1]*t[1] + t[3]*t[3]);
+	float sx = sqrt(t[0]*t[0] + t[2]*t[2]);
+	float sy = sqrt(t[1]*t[1] + t[3]*t[3]);
 	return (sx + sy) * 0.5f;
 }
 
@@ -1702,7 +1702,7 @@
 		str = nsvg__getNextDashItem(str, item);
 		if (!*item) break;
 		if (count < NSVG_MAX_DASHES)
-			strokeDashArray[count++] = fabsf(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p)));
+			strokeDashArray[count++] = fabs(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p)));
 	}
 
 	for (i = 0; i < count; i++)
@@ -2052,7 +2052,7 @@
 }
 
 static float nsvg__sqr(float x) { return x*x; }
-static float nsvg__vmag(float x, float y) { return sqrtf(x*x + y*y); }
+static float nsvg__vmag(float x, float y) { return sqrt(x*x + y*y); }
 
 static float nsvg__vecrat(float ux, float uy, float vx, float vy)
 {
@@ -2064,7 +2064,7 @@
 	float r = nsvg__vecrat(ux,uy, vx,vy);
 	if (r < -1.0f) r = -1.0f;
 	if (r > 1.0f) r = 1.0f;
-	return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acosf(r);
+	return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acos(r);
 }
 
 static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
@@ -2080,11 +2080,11 @@
 	int i, ndivs;
 	float hda, kappa;
 
-	rx = fabsf(args[0]);				// y radius
-	ry = fabsf(args[1]);				// x radius
+	rx = fabs(args[0]);				// y radius
+	ry = fabs(args[1]);				// x radius
 	rotx = args[2] / 180.0f * NSVG_PI;		// x rotation angle
-	fa = fabsf(args[3]) > 1e-6 ? 1 : 0;	// Large arc
-	fs = fabsf(args[4]) > 1e-6 ? 1 : 0;	// Sweep direction
+	fa = fabs(args[3]) > 1e-6 ? 1 : 0;	// Large arc
+	fs = fabs(args[4]) > 1e-6 ? 1 : 0;	// Sweep direction
 	x1 = *cpx;							// start point
 	y1 = *cpy;
 	if (rel) {							// end point
@@ -2097,7 +2097,7 @@
 
 	dx = x1 - x2;
 	dy = y1 - y2;
-	d = sqrtf(dx*dx + dy*dy);
+	d = sqrt(dx*dx + dy*dy);
 	if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) {
 		// The arc degenerates to a line
 		nsvg__lineTo(p, x2, y2);
@@ -2106,8 +2106,8 @@
 		return;
 	}
 
-	sinrx = sinf(rotx);
-	cosrx = cosf(rotx);
+	sinrx = sin(rotx);
+	cosrx = cos(rotx);
 
 	// Convert to center point parameterization.
 	// http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
@@ -2116,7 +2116,7 @@
 	y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f;
 	d = nsvg__sqr(x1p)/nsvg__sqr(rx) + nsvg__sqr(y1p)/nsvg__sqr(ry);
 	if (d > 1) {
-		d = sqrtf(d);
+		d = sqrt(d);
 		rx *= d;
 		ry *= d;
 	}
@@ -2126,7 +2126,7 @@
 	sb = nsvg__sqr(rx)*nsvg__sqr(y1p) + nsvg__sqr(ry)*nsvg__sqr(x1p);
 	if (sa < 0.0f) sa = 0.0f;
 	if (sb > 0.0f)
-		s = sqrtf(sa / sb);
+		s = sqrt(sa / sb);
 	if (fa == fs)
 		s = -s;
 	cxp = s * rx * y1p / ry;
@@ -2159,16 +2159,16 @@
 
 	// Split arc into max 90 degree segments.
 	// The loop assumes an iteration per end point (including start and end), this +1.
-	ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f);
+	ndivs = (int)(fabs(da) / (NSVG_PI*0.5f) + 1.0f);
 	hda = (da / (float)ndivs) / 2.0f;
-	kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda));
+	kappa = fabs(4.0f / 3.0f * (1.0f - cos(hda)) / sin(hda));
 	if (da < 0.0f)
 		kappa = -kappa;
 
 	for (i = 0; i <= ndivs; i++) {
 		a = a1 + da * ((float)i/(float)ndivs);
-		dx = cosf(a);
-		dy = sinf(a);
+		dx = cos(a);
+		dy = sin(a);
 		nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); // position
 		nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); // tangent
 		if (i > 0)
@@ -2331,8 +2331,8 @@
 			if (strcmp(attr[i], "y") == 0) y = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
 			if (strcmp(attr[i], "width") == 0) w = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p));
 			if (strcmp(attr[i], "height") == 0) h = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p));
-			if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
-			if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+			if (strcmp(attr[i], "rx") == 0) rx = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+			if (strcmp(attr[i], "ry") == 0) ry = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
 		}
 	}
 
@@ -2381,7 +2381,7 @@
 		if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
 			if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
 			if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
-			if (strcmp(attr[i], "r") == 0) r = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualLength(p)));
+			if (strcmp(attr[i], "r") == 0) r = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualLength(p)));
 		}
 	}
 
@@ -2412,8 +2412,8 @@
 		if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
 			if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
 			if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
-			if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
-			if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+			if (strcmp(attr[i], "rx") == 0) rx = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+			if (strcmp(attr[i], "ry") == 0) ry = fabs(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
 		}
 	}
 
Index: png/png.c
===================================================================
--- png/png.c	(revision 12504)
+++ png/png.c	(working copy)
@@ -159,6 +159,13 @@
    }
 }
 
+
+#ifdef PNG_SETJMP_SUPPORTED
+void png_longjmp_wrapper(jmp_buf buf, int i){
+    longjmp(buf, i);
+}
+#endif
+
 /* Check a user supplied version number, called from both read and write
  * functions that create a png_struct.
  */
@@ -281,7 +288,7 @@
           */
          create_struct.jmp_buf_ptr = &create_jmp_buf;
          create_struct.jmp_buf_size = 0; /*stack allocation*/
-         create_struct.longjmp_fn = longjmp;
+         create_struct.longjmp_fn = png_longjmp_wrapper;
 #  else
       {
 #  endif
Index: png/png.h
===================================================================
--- png/png.h	(revision 12504)
+++ png/png.h	(working copy)
@@ -965,7 +965,9 @@
  * your compiler.  This may be very difficult - try using a different compiler
  * to build the library!
  */
-PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
+PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr),
+    PNGARG((jmp_buf, int)), typedef);
+PNG_EXPORT(2, void, png_longjmp_wrapper, (jmp_buf, int));
 #endif
 
 /* Transform masks for the high-level interface */
@@ -1088,7 +1090,7 @@
 PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr,
     png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
 #  define png_jmpbuf(png_ptr) \
-      (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf))))
+      (*png_set_longjmp_fn((png_ptr), png_longjmp_wrapper, (sizeof (jmp_buf))))
 #else
 #  define png_jmpbuf(png_ptr) \
       (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
Index: png/pngconf.h
===================================================================
--- png/pngconf.h	(revision 12504)
+++ png/pngconf.h	(working copy)
@@ -443,7 +443,7 @@
 
 #  elif defined(__WATCOMC__)
 #    ifndef PNG_RESTRICT
-#      define PNG_RESTRICT __restrict
+#      define PNG_RESTRICT
 #    endif
 #  endif
 #endif /* PNG_PEDANTIC_WARNINGS */
Index: png/pngerror.c
===================================================================
--- png/pngerror.c	(revision 12504)
+++ png/pngerror.c	(working copy)
@@ -688,7 +688,7 @@
             {
                png_ptr->jmp_buf_ptr = &free_jmp_buf; /* come back here */
                png_ptr->jmp_buf_size = 0; /* stack allocation */
-               png_ptr->longjmp_fn = longjmp;
+               png_ptr->longjmp_fn = png_longjmp_wrapper;
                png_free(png_ptr, jb); /* Return to setjmp on error */
             }
          }
Index: src/Fl_PNG_Image.cxx
===================================================================
--- src/Fl_PNG_Image.cxx	(revision 12504)
+++ src/Fl_PNG_Image.cxx	(working copy)
@@ -56,7 +56,7 @@
 } fl_png_memory;
 
 extern "C" {
-  static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data
+  static void PNGCAPI png_read_data_from_mem( png_structp png_ptr, //pointer to our data
 				      png_bytep data,  // where to copy the image data for libpng computing
 				      png_size_t length) // length of data to copy
   {
@@ -146,7 +146,7 @@
     w(0); h(0); d(0); ld(ERR_FORMAT);
     return;
   }
-
+  
   if (setjmp(png_jmpbuf(pp))) {
     png_destroy_read_struct(&pp, &info, NULL);
     if (!from_memory) fclose(fp);
Index: src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx
===================================================================
--- src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx	(revision 12504)
+++ src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx	(working copy)
@@ -32,6 +32,10 @@
 #define _USE_MATH_DEFINES
 #include <math.h>
 
+#if defined __WATCOMC__ && !defined M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 void Fl_OpenGL_Graphics_Driver::arc(int x,int y,int w,int h,double a1,double a2) {
   if (w <= 0 || h <= 0) return;
   while (a2<a1) a2 += 360.0;  // TODO: write a sensible fmod angle alignment here
Index: src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
===================================================================
--- src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx	(revision 12504)
+++ src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx	(working copy)
@@ -110,7 +110,7 @@
   int num_segments = (int)(10 * sqrt(rMax))+1;
   double theta = 2 * M_PI / float(num_segments);
   double tangetial_factor = tan(theta);
-  double radial_factor = cosf(theta);//calculate the radial factor
+  double radial_factor = cos(theta);//calculate the radial factor
   double x = r; //we start at angle = 0
   double y = 0;
 
Index: src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
===================================================================
--- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H	(revision 12504)
+++ src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H	(working copy)
@@ -30,6 +30,13 @@
 
 class Fl_Window;
 
+#ifdef __WATCOMC__
+#if WINVER >= 0x0500
+#include <NT/windef.h> // For HMONITOR
+#else
+typedef HANDLE HMONITOR;
+#endif
+#endif
 
 class FL_EXPORT Fl_WinAPI_Screen_Driver : public Fl_Screen_Driver 
 {
Index: src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
===================================================================
--- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx	(revision 12504)
+++ src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx	(working copy)
@@ -35,7 +35,7 @@
 // end of extern additions workaround
 
 
-#if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500)
+#if !defined __WATCOMC__ && !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500)
 #  define COMPILE_MULTIMON_STUBS
 #  include <multimon.h>
 #endif // !HMONITOR_DECLARED && _WIN32_WINNT < 0x0500
@@ -71,7 +71,7 @@
 // If we were to insist on the existence of "EnumDisplayMonitors" and
 // "GetMonitorInfoA", it would be impossible to use FLTK on Windows 2000
 // before SP2 or earlier.
-
+#ifndef __WATCOMC__
 // BOOL EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM)
 typedef BOOL(WINAPI* fl_edm_func)(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
 // BOOL GetMonitorInfo(HMONITOR, LPMONITORINFO)
@@ -79,7 +79,6 @@
 
 static fl_gmi_func fl_gmi = NULL; // used to get a proc pointer for GetMonitorInfoA
 
-
 BOOL Fl_WinAPI_Screen_Driver::screen_cb(HMONITOR mon, HDC hdc, LPRECT r, LPARAM d)
 {
   Fl_WinAPI_Screen_Driver *drv = (Fl_WinAPI_Screen_Driver*)d;
@@ -120,9 +119,11 @@
   return TRUE;
 }
 
+#endif
 
 void Fl_WinAPI_Screen_Driver::init()
 {
+#ifndef __WATCOMC__
   open_display();
   // Since not all versions of Windows include multiple monitor support,
   // we do a run-time check for the required functions...
@@ -146,7 +147,7 @@
       }
     }
   }
-
+#endif
   // If we get here, assume we have 1 monitor...
   num_screens = 1;
   screens[0].top = 0;
Index: test/threads.h
===================================================================
--- test/threads.h	(revision 12504)
+++ test/threads.h	(working copy)
@@ -66,9 +66,7 @@
 #    include <process.h>
 
 typedef unsigned long Fl_Thread;
-extern "C" {
-  typedef void *(__cdecl Fl_Thread_Func)(void *);
-}
+typedef void *(Fl_Thread_Func)(void *);
 
 static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
   return t = (Fl_Thread)_beginthread((void(* )( void * ))f, 32000, p);
