diff -crN ./7.3.0/src/mga/config.h.in ./7.3.0_modified/src/mga/config.h.in
*** ./7.3.0/src/mga/config.h.in	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/config.h.in	Mon Aug 25 18:18:15 2008
***************
*** 61,63 ****
--- 61,66 ----
  
  /* Enable developmental DRI driver support */
  #undef XF86DRI_DEVEL
+ 
+ /* Enable MGA HAL support */
+ #define USEMGAHAL 1
diff -crN ./7.3.0/src/mga/src/clientlx.c ./7.3.0_modified/src/mga/src/clientlx.c
*** ./7.3.0/src/mga/src/clientlx.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/clientlx.c	Mon Aug 25 17:51:36 2008
***************
*** 13,19 ****
  
  #include "xf86_OSproc.h"
  #include "xf86Pci.h"
! #include "xf86_ansic.h"
  #include "client.h"
  #include "mga.h"
  
--- 13,24 ----
  
  #include "xf86_OSproc.h"
  #include "xf86Pci.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "client.h"
  #include "mga.h"
  
diff -crN ./7.3.0/src/mga/src/mga_arc.c ./7.3.0_modified/src/mga/src/mga_arc.c
*** ./7.3.0/src/mga/src/mga_arc.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_arc.c	Mon Aug 25 17:51:50 2008
***************
*** 43,49 ****
  #include "xaalocal.h"
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  
  #include "xf86Pci.h"
  
--- 43,54 ----
  #include "xaalocal.h"
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "xf86Pci.h"
  
diff -crN ./7.3.0/src/mga/src/mga_bios.c ./7.3.0_modified/src/mga/src/mga_bios.c
*** ./7.3.0/src/mga/src/mga_bios.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_bios.c	Mon Aug 25 17:51:56 2008
***************
*** 44,50 ****
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include "xf86_ansic.h"
  
  #include "compiler.h"
  
--- 44,55 ----
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "compiler.h"
  
diff -crN ./7.3.0/src/mga/src/mga_dac3026.c ./7.3.0_modified/src/mga/src/mga_dac3026.c
*** ./7.3.0/src/mga/src/mga_dac3026.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_dac3026.c	Mon Aug 25 17:52:03 2008
***************
*** 42,48 ****
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h" 
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
--- 42,53 ----
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_dacG.c ./7.3.0_modified/src/mga/src/mga_dacG.c
*** ./7.3.0/src/mga/src/mga_dacG.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_dacG.c	Mon Aug 25 17:56:05 2008
***************
*** 13,24 ****
  #include "config.h"
  #endif
  
  #include "colormapst.h"
  
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h" 
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
--- 13,31 ----
  #include "config.h"
  #endif
  
+ #include "binding.h"
+ 
  #include "colormapst.h"
  
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_dga.c ./7.3.0_modified/src/mga/src/mga_dga.c
*** ./7.3.0/src/mga/src/mga_dga.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_dga.c	Mon Aug 25 17:52:15 2008
***************
*** 6,12 ****
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  #include "xf86Pci.h"
  #include "xf86PciInfo.h"
  #include "xaa.h"
--- 6,17 ----
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "xf86Pci.h"
  #include "xf86PciInfo.h"
  #include "xaa.h"
diff -crN ./7.3.0/src/mga/src/mga_dh.c ./7.3.0_modified/src/mga/src/mga_dh.c
*** ./7.3.0/src/mga/src/mga_dh.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_dh.c	Mon Aug 25 17:52:21 2008
***************
*** 12,18 ****
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h" 
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
--- 12,23 ----
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_dri.c ./7.3.0_modified/src/mga/src/mga_dri.c
*** ./7.3.0/src/mga/src/mga_dri.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_dri.c	Mon Aug 25 17:52:27 2008
***************
*** 34,40 ****
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  #include "xf86Priv.h"
  
  #include "xf86PciInfo.h"
--- 34,45 ----
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "xf86Priv.h"
  
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_driver.c ./7.3.0_modified/src/mga/src/mga_driver.c
*** ./7.3.0/src/mga/src/mga_driver.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_driver.c	Mon Aug 25 17:52:33 2008
***************
*** 57,63 ****
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include "xf86_ansic.h"
  
  #include "compiler.h"
  
--- 57,68 ----
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "compiler.h"
  
diff -crN ./7.3.0/src/mga/src/mga_esc.c ./7.3.0_modified/src/mga/src/mga_esc.c
*** ./7.3.0/src/mga/src/mga_esc.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_esc.c	Mon Aug 25 17:52:37 2008
***************
*** 19,25 ****
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include "xf86_ansic.h"
  
  #include "compiler.h"
  
--- 19,30 ----
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "compiler.h"
  
diff -crN ./7.3.0/src/mga/src/mga_g450pll.c ./7.3.0_modified/src/mga/src/mga_g450pll.c
*** ./7.3.0/src/mga/src/mga_g450pll.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_g450pll.c	Mon Aug 25 17:52:41 2008
***************
*** 7,13 ****
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h" 
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
--- 7,18 ----
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  /* Drivers for PCI hardware need this */
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_hwcurs.c ./7.3.0_modified/src/mga/src/mga_hwcurs.c
*** ./7.3.0/src/mga/src/mga_hwcurs.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_hwcurs.c	Mon Aug 25 17:52:46 2008
***************
*** 6,12 ****
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  
  #include "xf86Pci.h"
  #include "xf86PciInfo.h"
--- 6,17 ----
  
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "xf86Pci.h"
  #include "xf86PciInfo.h"
diff -crN ./7.3.0/src/mga/src/mga_merge.c ./7.3.0_modified/src/mga/src/mga_merge.c
*** ./7.3.0/src/mga/src/mga_merge.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_merge.c	Mon Aug 25 17:52:49 2008
***************
*** 10,16 ****
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include "xf86_ansic.h"
  
  #include "compiler.h"
  
--- 10,21 ----
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "compiler.h"
  
diff -crN ./7.3.0/src/mga/src/mga_pal.c ./7.3.0_modified/src/mga/src/mga_pal.c
*** ./7.3.0/src/mga/src/mga_pal.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_pal.c	Mon Aug 25 17:52:53 2008
***************
*** 9,15 ****
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include "xf86_ansic.h"
  
  #include "compiler.h"
  
--- 9,20 ----
  #include "xf86Resources.h"
  
  /* All drivers need this */
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  #include "compiler.h"
  
diff -crN ./7.3.0/src/mga/src/mga_shadow.c ./7.3.0_modified/src/mga/src/mga_shadow.c
*** ./7.3.0/src/mga/src/mga_shadow.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_shadow.c	Mon Aug 25 17:52:56 2008
***************
*** 12,18 ****
  #include "xf86.h"
  #include "xf86_OSproc.h"
  #include "xf86Resources.h"
! #include "xf86_ansic.h"
  #include "xf86PciInfo.h"
  #include "xf86Pci.h"
  #include "mga_reg.h"
--- 12,23 ----
  #include "xf86.h"
  #include "xf86_OSproc.h"
  #include "xf86Resources.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "xf86PciInfo.h"
  #include "xf86Pci.h"
  #include "mga_reg.h"
diff -crN ./7.3.0/src/mga/src/mga_storm.c ./7.3.0_modified/src/mga/src/mga_storm.c
*** ./7.3.0/src/mga/src/mga_storm.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_storm.c	Mon Aug 25 17:53:01 2008
***************
*** 7,13 ****
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  
  /* For correct __inline__ usage */
  #include "compiler.h"
--- 7,18 ----
  /* All drivers should typically include these */
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  
  /* For correct __inline__ usage */
  #include "compiler.h"
diff -crN ./7.3.0/src/mga/src/mga_vga.c ./7.3.0_modified/src/mga/src/mga_vga.c
*** ./7.3.0/src/mga/src/mga_vga.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_vga.c	Mon Aug 25 17:53:05 2008
***************
*** 3,9 ****
  #include "misc.h"
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include "xf86_ansic.h"
  #include "vgaHW.h"
  #include "compiler.h"
  #include "xf86cmap.h"
--- 3,14 ----
  #include "misc.h"
  #include "xf86.h"
  #include "xf86_OSproc.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "vgaHW.h"
  #include "compiler.h"
  #include "xf86cmap.h"
diff -crN ./7.3.0/src/mga/src/mga_video.c ./7.3.0_modified/src/mga/src/mga_video.c
*** ./7.3.0/src/mga/src/mga_video.c	Tue Apr 25 21:58:43 2006
--- ./7.3.0_modified/src/mga/src/mga_video.c	Mon Aug 25 17:53:08 2008
***************
*** 7,13 ****
  #include "xf86.h"
  #include "xf86_OSproc.h"
  #include "xf86Resources.h"
! #include "xf86_ansic.h"
  #include "compiler.h"
  #include "xf86PciInfo.h"
  #include "xf86Pci.h"
--- 7,18 ----
  #include "xf86.h"
  #include "xf86_OSproc.h"
  #include "xf86Resources.h"
! #include <errno.h>
! #include <string.h>
! #include <stdio.h>
! #include <math.h>
! #include <assert.h>
! #include <stdlib.h>
  #include "compiler.h"
  #include "xf86PciInfo.h"
  #include "xf86Pci.h"
