ANSI C fixes.

diff --git a/debugger/msc.c b/debugger/msc.c
index 1a5de9d..9a62281 100644
--- a/debugger/msc.c
+++ b/debugger/msc.c
@@ -618,7 +618,7 @@
 
   curr_type = 0x1000;
 
-  ptr = (union any_size) (table + 16);
+  ptr.c = (table + 16);
   while( ptr.c - table < len )
     {
       type = (union codeview_type *) ptr.c;
@@ -1033,7 +1033,9 @@
                 dbglist = deefer;
             }
 	  break;
+#if 0
 	default:
+#endif
 	}
     }
     DEBUG_next_index++;
@@ -1545,7 +1547,7 @@
   /*
    * Now get the important bits.
    */
-  pnt = (union any_size) linetab;
+  pnt.c = linetab;
   nfile = *pnt.s++;
   nseg = *pnt.s++;
 
@@ -1557,7 +1559,7 @@
   nseg = 0;
   for(i=0; i<nfile; i++)
     {
-      pnt2 = (union any_size) (linetab + filetab[i]);
+      pnt2.c = linetab + filetab[i];
       nseg += *pnt2.s;
     }
 
@@ -1588,7 +1590,7 @@
       /*
        * Get the pointer into the segment information.
        */
-      pnt2 = (union any_size) (linetab + filetab[i]);
+      pnt2.c = linetab + filetab[i];
       file_segcount = *pnt2.s;
 
       pnt2.ui++;
@@ -1605,7 +1607,7 @@
 
       for(k = 0; k < file_segcount; k++, this_seg++)
 	{
-	  pnt2 = (union any_size) (linetab + lt_ptr[k]);
+	  pnt2.c = linetab + lt_ptr[k];
 	  lt_hdr[this_seg].start      = start[k].start;
 	  lt_hdr[this_seg].end	      = start[k].end;
 	  lt_hdr[this_seg].sourcefile = fn;
@@ -1642,7 +1644,7 @@
   char			  symname[PATH_MAX];
   struct name_hash	* thunk_sym = NULL;
 
-  ptr = (union any_size) cv_data;
+  ptr.c = cv_data;
   nsect = deefer->nsect;
   sectp = deefer->sectp;
 
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index d4a6ba5..abdeaab 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -31,7 +31,7 @@
 /* << COMBOEX_DeleteItem >> */
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_GetComboControl (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
@@ -42,7 +42,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_GetEditControl (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
@@ -56,7 +56,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_GetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
@@ -65,7 +65,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_GetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
@@ -112,7 +112,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
@@ -141,7 +141,7 @@
 /* << COMBOEX_SetItem32W >> */
 
 
-__inline__ static LRESULT
+inline static LRESULT
 COMBOEX_Forward (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 5c8b923..7994e4b 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -659,7 +659,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HEADER_GetItemCount (HWND hwnd)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
@@ -689,7 +689,7 @@
 /* << HEADER_GetOrderArray >> */
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HEADER_GetUnicodeFormat (HWND hwnd)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
@@ -1074,7 +1074,7 @@
 /* << HEADER_SetOrderArray >> */
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HEADER_SetUnicodeFormat (HWND hwnd, WPARAM wParam)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
@@ -1147,7 +1147,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 HEADER_GetFont (HWND hwnd)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c
index cb5c06d..b1f4f9d 100644
--- a/dlls/comctl32/hotkey.c
+++ b/dlls/comctl32/hotkey.c
@@ -91,7 +91,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HOTKEY_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr (hwnd);
@@ -163,7 +163,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HOTKEY_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     DWORD dwExStyle = GetWindowLongA (hwnd, GWL_EXSTYLE);
@@ -194,7 +194,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 HOTKEY_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 1392e20..d5a5cc1 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -4712,31 +4712,33 @@
     LRESULT lret;
     LONG lStyle;
 
-    // set column width only if in report mode
+    /* set column width only if in report mode */
     lStyle = GetWindowLongA(hwnd, GWL_STYLE);
     if ((lStyle & LVS_TYPEMASK) != LVS_REPORT)
 	return (FALSE);
 
-    // make sure we can get the listview info
+    /* make sure we can get the listview info */
     if (!(infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0)))
 	return (FALSE);  
-    if (!infoPtr->hwndHeader) // make sure we have a header
+    if (!infoPtr->hwndHeader) /* make sure we have a header */
 	return (FALSE);	
 	
-    // FIXME: currently ignoring LVSCW_AUTOSIZE (-1) and
-    // LVSCV_AUTOSIZE_USEHEADER (-2)
+    /*
+     * FIXME: currently ignoring LVSCW_AUTOSIZE (-1) and
+     * LVSCV_AUTOSIZE_USEHEADER (-2)
+     */
     if (cx < 0) 
 	return (FALSE);
 	
     hdi.mask = HDI_WIDTH;
     hdi.cxy = cx;
 
-    // call header to update the column change
+    /* call header to update the column change */
     lret = Header_SetItemA(infoPtr->hwndHeader, (WPARAM)iCol, (LPARAM)&hdi);
 
     infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd, LVS_REPORT);
 
-    InvalidateRect(hwnd, NULL, TRUE); // force redraw of the listview
+    InvalidateRect(hwnd, NULL, TRUE); /* force redraw of the listview */
 
     return lret;
 }
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index 23903fc..7a85595 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -24,7 +24,7 @@
 #define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO *)GetWindowLongA(hwnd, 0))
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_ForwardMouse (HWND hwnd, WPARAM wParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -35,7 +35,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_GetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -44,7 +44,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_GetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -53,7 +53,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_GetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -76,7 +76,7 @@
 /* << PAGER_GetDropTarget >> */
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_GetPos (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -113,7 +113,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_SetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -127,7 +127,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_SetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -141,7 +141,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -157,7 +157,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_SetChild (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -177,7 +177,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 PAGER_SetPos (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index f98f4d4..c368423 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -598,7 +598,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetBandCount (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -792,7 +792,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetBkColor (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -844,7 +844,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetRowCount (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -866,7 +866,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetTextColor (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -877,7 +877,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetToolTips (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -885,7 +885,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_GetUnicodeFormat (HWND hwnd)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -1495,7 +1495,7 @@
 /* << REBAR_SetTooltips >> */
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
@@ -1665,7 +1665,7 @@
 #endif
 
 
-__inline__ static LRESULT
+inline static LRESULT
 REBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     if (GetWindowLongA (hwnd, GWL_STYLE) & WS_BORDER) {
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 0d2917c..37fdd7f 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -281,7 +281,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 STATUSBAR_GetBorders (LPARAM lParam)
 {
     LPINT out = (LPINT) lParam;
@@ -465,7 +465,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 STATUSBAR_GetUnicodeFormat (HWND hwnd)
 {
     STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
@@ -473,7 +473,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 STATUSBAR_IsSimple (HWND hwnd)
 {
     STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
@@ -753,7 +753,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 STATUSBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam)
 {
     STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
@@ -913,7 +913,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 STATUSBAR_WMGetFont (HWND hwnd)
 {
     STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
@@ -942,7 +942,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 STATUSBAR_WMMouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
@@ -978,7 +978,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam);
@@ -986,7 +986,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 STATUSBAR_WMNCLButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     PostMessageA (GetParent (hwnd), WM_NCLBUTTONUP, wParam, lParam);
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index e49b146..c397f3a 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1259,7 +1259,7 @@
 }
 
 
-static __inline__ LRESULT
+static inline LRESULT
 TOOLBAR_GetBitmapFlags (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0;
@@ -1393,7 +1393,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_GetExtendedStyle (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
@@ -1615,7 +1615,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_HitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     return TOOLBAR_InternalHitTest (hwnd, (LPPOINT)lParam);
@@ -2221,7 +2221,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_SetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
@@ -2565,7 +2565,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_NCActivate (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
 /*    if (wndPtr->dwStyle & CCS_NODIVIDER) */
@@ -2575,7 +2575,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     if (!(GetWindowLongA (hwnd, GWL_STYLE) & CCS_NODIVIDER))
@@ -2635,7 +2635,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLBAR_Notify (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 3116d86..44419e4 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -1118,7 +1118,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_GetMaxTipWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1169,7 +1169,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_GetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1177,7 +1177,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_GetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1185,7 +1185,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_GetToolCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1379,7 +1379,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_Pop (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1503,7 +1503,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_SetMaxTipWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1515,7 +1515,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_SetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@@ -1526,7 +1526,7 @@
 }
 
 
-__inline__ static LRESULT
+inline static LRESULT
 TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index b57d99a..4320a33 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -1601,7 +1601,7 @@
   if (listItems>1) {
      prevsib=NULL;
 
-     switch ((INT)ptdi->hInsertAfter) {
+     switch ((DWORD) ptdi->hInsertAfter) {
 		case (DWORD) TVI_FIRST: 
 			if (wineItem->parent) {
 				wineItem->sibling=parentItem->firstChild;
diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c
index 415c76f..7dce147 100644
--- a/dlls/commdlg/fontdlg.c
+++ b/dlls/commdlg/fontdlg.c
@@ -400,7 +400,7 @@
   int i;
   
   TRACE(commdlg,"(nFontType=%d)\n",nFontType);
-  TRACE(commdlg,"  %s h=%d w=%d e=%d o=%d wg=%d i=%d u=%d s=%d"
+  TRACE(commdlg,"  %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d"
 	       " ch=%d op=%d cp=%d q=%d pf=%xh\n",
 	       lplf->lfFaceName,lplf->lfHeight,lplf->lfWidth,
 	       lplf->lfEscapement,lplf->lfOrientation,
diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 45ffabb..c28ed47 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -36,12 +36,12 @@
 	{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 };
 
-static __inline__ int IsLeapYear(int Year)
+static inline int IsLeapYear(int Year)
 {
 	return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0;
 }
 
-static __inline__ void NormalizeTimeFields(CSHORT *FieldToNormalize, CSHORT *CarryField,int Modulus)
+static inline void NormalizeTimeFields(CSHORT *FieldToNormalize, CSHORT *CarryField,int Modulus)
 {
 	*FieldToNormalize = (CSHORT) (*FieldToNormalize - Modulus);
 	*CarryField = (CSHORT) (*CarryField + 1);
diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c
index dd12bee..02aacbc 100644
--- a/dlls/shell32/folders.c
+++ b/dlls/shell32/folders.c
@@ -34,7 +34,7 @@
 static struct ICOM_VTABLE(IPersistFile) pfvt;
 
 #define _IPersistFile_Offset ((int)(&(((IExtractIconAImpl*)0)->lpvtblPersistFile)))
-#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((void*)name)-_IPersistFile_Offset);
+#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset);
 
 /**************************************************************************
 *  IExtractIconA_Constructor
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c
index 23d6c6d..7eaf94e 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -219,7 +219,7 @@
 static struct ICOM_VTABLE(IPersistFolder) psfvt;
 
 #define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder))) 
-#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((void*)name)-_IPersistFolder_Offset); 
+#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((char*)name)-_IPersistFolder_Offset); 
 
 /**************************************************************************
 *	  IShellFolder_Constructor
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 60dfb1c..366c230 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -54,15 +54,15 @@
 
 static struct ICOM_VTABLE(IOleCommandTarget) ctvt;
 #define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) 
-#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((void*)name)-_IOleCommandTarget_Offset); 
+#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); 
 
 static struct ICOM_VTABLE(IDropTarget) dtvt;
 #define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) 
-#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((void*)name)-_IDropTarget_Offset); 
+#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); 
 
 static struct ICOM_VTABLE(IViewObject) vovt;
 #define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) 
-#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((void*)name)-_IViewObject_Offset); 
+#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); 
 
 /*menu items */
 #define IDM_VIEW_FILES  (FCIDM_SHVIEWFIRST + 0x500)
diff --git a/graphics/ddraw.c b/graphics/ddraw.c
index 6177398..3345100 100644
--- a/graphics/ddraw.c
+++ b/graphics/ddraw.c
@@ -887,7 +887,7 @@
 	dstheight = xdst.bottom - xdst.top;
 	dstwidth = xdst.right - xdst.left;
 	width = (xdst.right - xdst.left) * bpp;
-	dbuf = ddesc.y.lpSurface + (xdst.top * ddesc.lPitch) + (xdst.left * bpp);
+	dbuf = (BYTE *) ddesc.y.lpSurface + (xdst.top * ddesc.lPitch) + (xdst.left * bpp);
 
 	dwFlags &= ~(DDBLT_WAIT|DDBLT_ASYNC);/* FIXME: can't handle right now */
 	
@@ -941,7 +941,7 @@
 		LPBYTE sbase;
 		int sx, xinc, sy, yinc;
 
-		sbase = sdesc.y.lpSurface + (xsrc.top * sdesc.lPitch) + xsrc.left * bpp;
+		sbase = (BYTE *) sdesc.y.lpSurface + (xsrc.top * sdesc.lPitch) + xsrc.left * bpp;
 		xinc = (srcwidth << 16) / dstwidth;
 		yinc = (srcheight << 16) / dstheight;
 
@@ -1082,8 +1082,8 @@
 	IDirectDrawSurface4_Lock(iface,NULL,&ddesc,DDLOCK_WRITEONLY,0);
 
 	bpp = This->s.surface_desc.ddpfPixelFormat.x.dwRGBBitCount / 8;
-	sbuf = sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp;
-	dbuf = ddesc.y.lpSurface + (dsty      * ddesc.lPitch) + dstx       * bpp;
+	sbuf = (BYTE *) sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp;
+	dbuf = (BYTE *) ddesc.y.lpSurface + (dsty      * ddesc.lPitch) + dstx       * bpp;
 
 
 	h=rsrc->bottom-rsrc->top;
@@ -1110,8 +1110,8 @@
 
 #define COPYBOX_COLORKEY(type) { \
 	type *d = (type *)dbuf, *s = (type *)sbuf, tmp; \
-	s = sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp; \
-	d = ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp; \
+	s = (type *) ((BYTE *) sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp); \
+	d = (type *) ((BYTE *) ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp); \
 	for (y = 0; y < h; y++) { \
 		for (x = 0; x < w; x++) { \
 			tmp = s[x]; \
diff --git a/graphics/ddraw_private.h b/graphics/ddraw_private.h
index 48ccb83..bf62da1 100644
--- a/graphics/ddraw_private.h
+++ b/graphics/ddraw_private.h
@@ -2,6 +2,7 @@
 #define __GRAPHICS_WINE_DDRAW_PRIVATE_H
 
 #include "ddraw.h"
+#include "winuser.h"
 
 /*****************************************************************************
  * Predeclare the interface implementation structures
diff --git a/graphics/dispdib.c b/graphics/dispdib.c
index 2b741b8..3ef7b16 100644
--- a/graphics/dispdib.c
+++ b/graphics/dispdib.c
@@ -10,6 +10,7 @@
 #include "dispdib.h"
 #include "vga.h"
 #include "debug.h"
+#include "wine/wingdi16.h"
 
 DEFAULT_DEBUG_CHANNEL(ddraw)
 
diff --git a/graphics/psdrv/init.c b/graphics/psdrv/init.c
index cbc34f2..d72e502 100644
--- a/graphics/psdrv/init.c
+++ b/graphics/psdrv/init.c
@@ -169,6 +169,7 @@
 /* dmDisplayFrequency */ 0
   },
   { /* dmDocPrivate */
+    0 /* dummy */
   },
   { /* dmDrvPrivate */
 /* ppdfilename */	"default.ppd"
diff --git a/include/dplay.h b/include/dplay.h
index e24ae83..9445d70 100644
--- a/include/dplay.h
+++ b/include/dplay.h
@@ -362,6 +362,7 @@
     DWORD               dwFlags,
     LPVOID              lpContext );
 
+#include "poppack.h"
 
 /*****************************************************************************
  * IDirectPlay interface
@@ -584,7 +585,4 @@
 #define IDirectPlay3_GetPlayerFlags(p,a,b)                 ICOM_CALL2(GetPlayerFlags,p,a,b)
 #endif
 
-
-#include "poppack.h"
-
 #endif /* __WINE_DPLAY_H */
diff --git a/include/dplobby.h b/include/dplobby.h
index 4f1bfe0..8339a65 100644
--- a/include/dplobby.h
+++ b/include/dplobby.h
@@ -3,8 +3,7 @@
 
 #include "dplay.h"
 
-
-#pragma pack(1)
+#include "pshpack1.h"
 
 /*****************************************************************************
  * Predeclare the interfaces
@@ -72,6 +71,7 @@
     LPVOID          lpContext,
     DWORD           dwFlags );
 
+#include "poppack.h"
 
 /*****************************************************************************
  * IDirectPlayLobby interface
@@ -148,7 +148,4 @@
 #define IDirectPlayLobby2_CreateCompoundAddress(p,a,b,c,d) ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d)
 #endif
 
-#pragma pack(4)
-
-
 #endif /* __WINE_DPLOBBY_H */
diff --git a/include/heap.h b/include/heap.h
index 59a7619..ed1c979 100644
--- a/include/heap.h
+++ b/include/heap.h
@@ -7,6 +7,8 @@
 #ifndef __WINE_HEAP_H
 #define __WINE_HEAP_H
 
+#include "config.h"
+
 #include "winbase.h"
 
 extern HANDLE SystemHeap;
@@ -32,7 +34,7 @@
 #define SEGPTR_STRDUP_WtoA(str) \
          (HIWORD(str) ? HEAP_strdupWtoA( SegptrHeap, 0, (str) ) : (LPSTR)(str))
 	/* define an inline function, a macro won't do */
-static __inline__ SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) {
+static inline SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) {
          return (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr);
 }
 #define SEGPTR_GET(ptr) SEGPTR_Get(ptr)
diff --git a/include/metafile.h b/include/metafile.h
index ae2f952..94cdad7 100644
--- a/include/metafile.h
+++ b/include/metafile.h
@@ -17,13 +17,13 @@
     METAHEADER  *mh;
 } METAFILEOBJ;
 
-#pragma pack(1)
+#include "pshpack1.h"
 typedef struct {
     DWORD dw1, dw2, dw3;
     WORD w4;
     CHAR filename[0x100];
 } METAHEADERDISK;
-#pragma pack(4)
+#include "poppack.h"
 
 #define MFHEADERSIZE (sizeof(METAHEADER))
 #define MFVERSION 0x300
diff --git a/include/mmsystem.h b/include/mmsystem.h
index b63a6f0..1e16301 100644
--- a/include/mmsystem.h
+++ b/include/mmsystem.h
@@ -2819,8 +2819,8 @@
 	UINT	wCustomCommandTable;	/* custom command table (0xFFFF if none) * filled in by the driver */
 	UINT	wType;			/* driver type (filled in by the driver) */
 } MCI_OPEN_DRIVER_PARMSW, *LPMCI_OPEN_DRIVER_PARMSW;
-DECL_WINELIB_TYPE_AW(MCI_OPEN_DRIVER_PARMS);
-DECL_WINELIB_TYPE_AW(LPMCI_OPEN_DRIVER_PARMS);
+DECL_WINELIB_TYPE_AW(MCI_OPEN_DRIVER_PARMS)
+DECL_WINELIB_TYPE_AW(LPMCI_OPEN_DRIVER_PARMS)
 
 DWORD 		WINAPI	mciGetDriverData16(UINT16 uDeviceID);
 DWORD 		WINAPI	mciGetDriverData(UINT uDeviceID);
diff --git a/include/psdrv.h b/include/psdrv.h
index 3f27316..b32a32b 100644
--- a/include/psdrv.h
+++ b/include/psdrv.h
@@ -144,6 +144,7 @@
 typedef struct {
     DEVMODE16			dmPublic;
     struct _tagdocprivate {
+      int dummy;
     }				dmDocPrivate;
     struct _tagdrvprivate {
       char	ppdFileName[100]; /* Hack */
diff --git a/include/shellapi.h b/include/shellapi.h
index b76eacb..4291a47 100644
--- a/include/shellapi.h
+++ b/include/shellapi.h
@@ -3,7 +3,7 @@
 
 #include "windef.h"
 
-#pragma pack(1)
+#include "pshpack1.h"
 
 /******************************************
  * DragObject
@@ -264,6 +264,6 @@
 BOOL      WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
 #define     ShellAbout WINELIB_NAME_AW(ShellAbout)
 
-#pragma pack(4)
+#include "poppack.h"
 
 #endif /* _WINE_SHELLAPI_H */
diff --git a/include/sig_context.h b/include/sig_context.h
index 1c43d94..326d624 100644
--- a/include/sig_context.h
+++ b/include/sig_context.h
@@ -82,7 +82,7 @@
 
 #endif  /* FreeBSD */
 
-#if defined(__svr4__) || defined(_SCO_DS)
+#if defined(__svr4__) || defined(_SCO_DS) || defined(__sun)
 
 #include <signal.h>
 #ifdef _SCO_DS
@@ -174,7 +174,7 @@
 
 #endif  /* linux || __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
 
-#if defined(__svr4__) || defined(_SCO_DS)
+#if defined(__svr4__) || defined(_SCO_DS) || defined(__sun)
 
 #ifdef _SCO_DS
 #define gregs regs
diff --git a/include/winsock.h b/include/winsock.h
index 217764f..9ee1c5e 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -456,14 +456,18 @@
 
 #define WS_AF_MAX          27
 
+#include "pshpack1.h"
+
 struct ws_sockaddr_ipx
 {
-	INT16		sipx_family	__attribute__((packed));
-	UINT		sipx_network	__attribute__((packed));
-	CHAR		sipx_node[6]	__attribute__((packed));
-	UINT16		sipx_port	__attribute__((packed));
+	INT16		sipx_family;
+	UINT		sipx_network;
+	CHAR		sipx_node[6];
+	UINT16		sipx_port;
 };
 
+#include "poppack.h"
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/ipc/dde_atom.c b/ipc/dde_atom.c
index 01080a7..5d90f9a 100644
--- a/ipc/dde_atom.c
+++ b/ipc/dde_atom.c
@@ -39,7 +39,7 @@
 #define ATOM_OFS(idx) (main_block->atoms[idx])
 
 /* rot_left: rotate (with wrap-around) */
-static __inline__ int rot_left(unsigned var,int count)
+static inline int rot_left(unsigned var,int count)
 {
   return (var<<count) | (var>> (sizeof(var)-count));
 }
diff --git a/ipc/generic_hash.c b/ipc/generic_hash.c
index df0449b..198fcd3 100644
--- a/ipc/generic_hash.c
+++ b/ipc/generic_hash.c
@@ -516,7 +516,7 @@
 
 
 /********** Hash usage *************/
-static __inline__ BOOL
+static inline BOOL
 correct_entry(HASH_ITEM *item, int key, HASH_VAL *seeked_data,
 	      HASH_ITEM_TEST *is_correct_item, BOOL skip_deleted)
 {
@@ -586,7 +586,7 @@
     
 }
 
-static __inline__ void sync_shared_hash(HASH_CONTAINER *hash)
+static inline void sync_shared_hash(HASH_CONTAINER *hash)
 {
     HASH_SHARED *shared= hash->shared;
     
diff --git a/ipc/shm_block.c b/ipc/shm_block.c
index fa9546f..14255cf 100644
--- a/ipc/shm_block.c
+++ b/ipc/shm_block.c
@@ -9,7 +9,7 @@
  */
 #ifdef CONFIG_IPC
 
-#define inline __inline__
+#define inline inline
 #include <sys/types.h>
 #include <sys/sem.h>
 #include <assert.h>
diff --git a/ipc/shm_main_blk.c b/ipc/shm_main_blk.c
index a92ad31..3333e2b 100644
--- a/ipc/shm_main_blk.c
+++ b/ipc/shm_main_blk.c
@@ -9,7 +9,7 @@
  */
 #ifdef CONFIG_IPC
 
-#define inline __inline__
+#define inline inline
 #include <sys/types.h>
 #include <sys/sem.h>
 #include <time.h>
diff --git a/ipc/shm_semaph.c b/ipc/shm_semaph.c
index 2dce9b1..fc4f5b6 100644
--- a/ipc/shm_semaph.c
+++ b/ipc/shm_semaph.c
@@ -9,7 +9,7 @@
  */
 #ifdef CONFIG_IPC
 
-#define inline __inline__
+#define inline inline
 #include <assert.h>
 #include <unistd.h>
 #include <sys/sem.h>
diff --git a/loader/dos/dosmod.c b/loader/dos/dosmod.c
index 2f2c683..d3f49bd 100644
--- a/loader/dos/dosmod.c
+++ b/loader/dos/dosmod.c
@@ -32,7 +32,7 @@
 
 #define SYS_vm86   166
 
-static __inline__ int vm86plus( int func, struct vm86plus_struct *ptr )
+static inline int vm86plus( int func, struct vm86plus_struct *ptr )
 {
     int res;
 #ifdef __PIC__
diff --git a/loader/signal.c b/loader/signal.c
index 97af53c..6dd77bd 100644
--- a/loader/signal.c
+++ b/loader/signal.c
@@ -89,7 +89,7 @@
 
 /* Similar to the sigaction function in libc, except it leaves alone the
    restorer field, which is used to specify the signal stack address */
-static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new,
+static inline int wine_sigaction( int sig, struct kernel_sigaction *new,
                                       struct kernel_sigaction *old )
 {
 #ifdef __PIC__
diff --git a/memory/ldt.c b/memory/ldt.c
index f36411e..0832009 100644
--- a/memory/ldt.c
+++ b/memory/ldt.c
@@ -30,7 +30,7 @@
     unsigned int  seg_not_present : 1;
 };
 
-static __inline__ int modify_ldt( int func, struct modify_ldt_s *ptr,
+static inline int modify_ldt( int func, struct modify_ldt_s *ptr,
                                   unsigned long count )
 {
     int res;
diff --git a/misc/winsock.c b/misc/winsock.c
index 29a4cb4..55676e89 100644
--- a/misc/winsock.c
+++ b/misc/winsock.c
@@ -246,7 +246,7 @@
     return NULL;
 }
 
-__inline__ static int sock_error_p(int s)
+inline static int sock_error_p(int s)
 {
     unsigned int optval, optlen;
 
diff --git a/multimedia/dsound.c b/multimedia/dsound.c
index 61b8a69..7ba1744 100644
--- a/multimedia/dsound.c
+++ b/multimedia/dsound.c
@@ -1714,14 +1714,14 @@
 /*	8-bit WAV is unsigned */
 /*	16-bit WAV is signed */
 
-static __inline__ INT16 cvtU8toS16(BYTE byte)
+static inline INT16 cvtU8toS16(BYTE byte)
 {
 	INT16	s = (byte - 128) << 8;
 
 	return s;
 }
 
-static __inline__ BYTE cvtS16toU8(INT16 word)
+static inline BYTE cvtS16toU8(INT16 word)
 {
 	BYTE	b = (word + 32768) >> 8;
 	
@@ -1732,7 +1732,7 @@
 /* We should be able to optimize these two inline functions */
 /* so that we aren't doing 8->16->8 conversions when it is */
 /* not necessary. But this is still a WIP. Optimize later. */
-static __inline__ void get_fields(const IDirectSoundBufferImpl *dsb, BYTE *buf, INT *fl, INT *fr)
+static inline void get_fields(const IDirectSoundBufferImpl *dsb, BYTE *buf, INT *fl, INT *fr)
 {
 	INT16	*bufs = (INT16 *) buf;
 
@@ -1765,7 +1765,7 @@
 	return;
 }
 
-static __inline__ void set_fields(BYTE *buf, INT fl, INT fr)
+static inline void set_fields(BYTE *buf, INT fl, INT fr)
 {
 	INT16 *bufs = (INT16 *) buf;
 
diff --git a/objects/brush.c b/objects/brush.c
index 279e88f..fd8c75e 100644
--- a/objects/brush.c
+++ b/objects/brush.c
@@ -222,13 +222,17 @@
 )
 {
     BITMAPINFO *info=(BITMAPINFO*)data;
-    LOGBRUSH logbrush = { BS_DIBPATTERN, coloruse, 0 };
+    LOGBRUSH logbrush;
     BITMAPINFO  *newInfo;
     INT size;
     
     TRACE(gdi, "%p %ldx%ld %dbpp\n", info, info->bmiHeader.biWidth,
 	  info->bmiHeader.biHeight,  info->bmiHeader.biBitCount);
 
+    logbrush.lbStyle = BS_DIBPATTERN;
+    logbrush.lbColor = coloruse;
+    logbrush.lbHatch = 0;
+
       /* Make a copy of the bitmap */
 
 
diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c
index 805dfdd..3c6ceb3 100644
--- a/objects/enhmetafile.c
+++ b/objects/enhmetafile.c
@@ -183,11 +183,11 @@
  	return emh->nDescription;
      }
  
-     first = lstrlenW( (void *)emh + emh->offDescription);
+     first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription));
  
-     lstrcpynWtoA(buf, (void *)emh + emh->offDescription, size);
+     lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size);
      buf += first + 1;
-     lstrcpynWtoA(buf, (void *)emh + emh->offDescription+2*(first+1),
+     lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)),
  		 size - first - 1);
  
      EMF_ReleaseEnhMetaHeader(hmf);
@@ -220,7 +220,7 @@
  	return emh->nDescription;
      }
  
-     memmove(buf, (void *)emh + emh->offDescription, 
+     memmove(buf, (char *) emh + emh->offDescription, 
  	    MIN(size,emh->nDescription));
      EMF_ReleaseEnhMetaHeader(hmf);
      return MIN(size, emh->nDescription);
@@ -555,7 +555,7 @@
     while (ret) {
         ret = (*callback)(hdc, ht, p, count, data); 
 	if (p->iType == EMR_EOF) break;
-	p = (void *) p + p->nSize;
+	p = (LPENHMETARECORD) ((char *) p + p->nSize);
     }
     HeapFree( GetProcessHeap(), 0, ht);
     EMF_ReleaseEnhMetaHeader(hmf);
@@ -591,7 +591,11 @@
 	  (lpRect->right - lpRect->left);
 	FLOAT yscale = (h->rclBounds.bottom - h->rclBounds.top) /
 	  (lpRect->bottom - lpRect->top);
-	XFORM xform = {xscale, 0, 0, yscale, 0, 0};
+	XFORM xform;
+	xform.eM11 = xscale;
+	xform.eM12 = 0;
+	xform.eM21 = 0;
+	xform.eM22 = yscale;
         xform.eDx = lpRect->left;
 	xform.eDy = lpRect->top; 
 	FIXME(enhmetafile, "play into rect doesn't work\n");
@@ -605,7 +609,7 @@
     while (1) {
         PlayEnhMetaFileRecord(hdc, ht, p, count);
 	if (p->iType == EMR_EOF) break;
-	p = (void *) p + p->nSize; /* casted so that arithmetic is in bytes */
+	p = (LPENHMETARECORD) ((char *) p + p->nSize); /* casted so that arithmetic is in bytes */
     }
     HeapFree( GetProcessHeap(), 0, ht );
     EMF_ReleaseEnhMetaHeader(hmf);