Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atexec.c acpica-unix2-20130626-aapits/tests/aapits/atexec.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atexec.c	2013-01-17 12:48:28.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atexec.c	2013-07-25 13:44:23.023894441 -0600
Al Stone a03e60
@@ -639,6 +639,7 @@
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone afae4e
+#if ACPI_MACHINE_WIDTH == 32
Al Stone afae4e
 /*******************************************************************************
Al Stone afae4e
  *
Al Stone afae4e
  * FUNCTION:    AtBuildLocalRSDT
Al Stone a03e60
@@ -757,8 +758,9 @@
Al Stone afae4e
         LocalRSDT->Header.Checksum = (UINT8)~LocalRSDT->Header.Checksum;
Al Stone afae4e
     }
Al Stone afae4e
 }
Al Stone afae4e
+#endif
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone afae4e
 /*******************************************************************************
Al Stone afae4e
  *
Al Stone afae4e
  * FUNCTION:    AtBuildLocalXSDT
Al Stone a03e60
@@ -1424,7 +1426,7 @@
Al Stone afae4e
         ACPI_WARNING ((AE_INFO,
Al Stone afae4e
             "Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, Len-%X\n",
Al Stone afae4e
             (RegionObject->Region.Node)->Name.Ascii, (UINT32) Address,
Al Stone afae4e
-            ByteWidth, (UINT32) BufferAddress, Length));
Al Stone afae4e
+            ByteWidth, (UINT32) BufferAddress, (UINT32) Length));
Al Stone afae4e
 
Al Stone afae4e
         return (AE_AML_REGION_LIMIT);
Al Stone afae4e
     }
Al Stone a03e60
@@ -1792,7 +1796,9 @@
Al Stone afae4e
             Path, Obj.Integer.Value, Value);
Al Stone afae4e
 #else
Al Stone afae4e
         printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
Al Stone afae4e
-            Path, Obj.Integer.Value, Value);
Al Stone afae4e
+            Path,
Al Stone afae4e
+	    (long long unsigned int) Obj.Integer.Value,
Al Stone afae4e
+	    (long long unsigned int) Value);
Al Stone afae4e
 #endif
Al Stone afae4e
         Status = AE_ERROR;
Al Stone afae4e
     }
Al Stone a03e60
@@ -1871,7 +1877,7 @@
Al Stone afae4e
     {
Al Stone afae4e
         TestErrors++;
Al Stone afae4e
         printf ("Test Error: cannot allocate buffer of %d bytes\n",
Al Stone afae4e
-            Results.Length);
Al Stone afae4e
+                (int) Results.Length);
Al Stone afae4e
         return (AE_NO_MEMORY);
Al Stone afae4e
     }
Al Stone afae4e
     Results.Pointer = Object;
Al Stone a03e60
@@ -1952,7 +1956,8 @@
Al Stone afae4e
     {
Al Stone afae4e
         printf ("AtCheckBuffer: unexpected length %d of Buffer vs"
Al Stone afae4e
             " calculated %d bytes\n",
Al Stone afae4e
-            Results.Length, ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length));
Al Stone afae4e
+            (int)Results.Length,
Al Stone afae4e
+	    (int)(ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length)));
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
     /* Initialize the return buffer structure */
Al Stone a03e60
@@ -1961,7 +1968,7 @@
Al Stone afae4e
     {
Al Stone afae4e
         TestErrors++;
Al Stone afae4e
         printf ("Test Error: cannot allocate buffer of %d bytes\n",
Al Stone afae4e
-            Results.Length);
Al Stone afae4e
+            (int) Results.Length);
Al Stone afae4e
         return (AE_NO_MEMORY);
Al Stone afae4e
     }
Al Stone afae4e
     Results.Pointer = Object;
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atinit.c acpica-unix2-20130626-aapits/tests/aapits/atinit.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atinit.c	2013-01-17 12:48:28.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atinit.c	2013-07-25 13:20:19.706705960 -0600
Al Stone a03e60
@@ -3024,7 +3024,7 @@
Al Stone afae4e
             AapiErrors++;
Al Stone afae4e
             printf ("API Error: AcpiGetSystemInfo() returned"
Al Stone afae4e
                 " Length %d, expected %d\n",
Al Stone afae4e
-                OutBuffer.Length, sizeof (Info));
Al Stone afae4e
+                (int) OutBuffer.Length, (int) sizeof (Info));
Al Stone afae4e
             return (AE_ERROR);
Al Stone afae4e
         }
Al Stone afae4e
 
Al Stone a03e60
@@ -3046,7 +3046,7 @@
Al Stone afae4e
             AapiErrors++;
Al Stone afae4e
             printf ("API Error: AcpiGetSystemInfo() returned"
Al Stone afae4e
                 " Length %d, expected %d\n",
Al Stone afae4e
-                OutBuffer.Length, sizeof (Info));
Al Stone afae4e
+                (int) OutBuffer.Length, (int) sizeof (Info));
Al Stone afae4e
             return (AE_ERROR);
Al Stone afae4e
         }
Al Stone afae4e
 
Al Stone a03e60
@@ -3066,7 +3066,7 @@
Al Stone afae4e
             AapiErrors++;
Al Stone afae4e
             printf ("API Error: AcpiGetSystemInfo() returned"
Al Stone afae4e
                 " Length %d, expected %d\n",
Al Stone afae4e
-                OutBuffer.Length, sizeof (Info));
Al Stone afae4e
+                (int) OutBuffer.Length, (int) sizeof (Info));
Al Stone afae4e
             return (AE_ERROR);
Al Stone afae4e
         }
Al Stone afae4e
         else if (OutBuffer.Pointer != &Info)
Al Stone a03e60
@@ -3149,7 +3149,7 @@
Al Stone afae4e
             AapiErrors++;
Al Stone afae4e
             printf ("API Error: AcpiGetSystemInfo() returned"
Al Stone afae4e
                 " Length %d, expected %d\n",
Al Stone afae4e
-                OutBuffer.Length, sizeof (Info));
Al Stone afae4e
+                (int) OutBuffer.Length, (int) sizeof (Info));
Al Stone afae4e
             return (AE_ERROR);
Al Stone afae4e
         }
Al Stone afae4e
         else if (OutBuffer.Pointer != &Info)
Al Stone a03e60
@@ -3214,7 +3214,7 @@
Al Stone afae4e
             AapiErrors++;
Al Stone afae4e
             printf ("API Error: AcpiGetSystemInfo() returned"
Al Stone afae4e
                 " Length %d, expected %d\n",
Al Stone afae4e
-                OutBuffer.Length, sizeof (ACPI_SYSTEM_INFO));
Al Stone afae4e
+                (int) OutBuffer.Length, (int) sizeof (ACPI_SYSTEM_INFO));
Al Stone afae4e
             return (AE_ERROR);
Al Stone afae4e
         }
Al Stone afae4e
         else
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atmain.c acpica-unix2-20130626-aapits/tests/aapits/atmain.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atmain.c	2013-01-17 12:48:28.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atmain.c	2013-07-25 13:18:22.083323948 -0600
Al Stone a03e60
@@ -315,7 +315,7 @@
Al Stone afae4e
     {
Al Stone afae4e
         printf ("ACPICA API TS err: test num %ld of test case %ld"
Al Stone afae4e
             " is not implemented\n",
Al Stone afae4e
-            test_num, test_case);
Al Stone afae4e
+            (long int) test_num, (long int) test_case);
Al Stone afae4e
         return (AtRetNotImpl);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -430,7 +432,7 @@
Al Stone afae4e
     if (test_case < 1 || test_case > AT_TEST_CASE_NUM)
Al Stone afae4e
     {
Al Stone afae4e
         printf ("ACPICA API TS err: test case %ld is out of range 1 - %d\n",
Al Stone afae4e
-            test_case, AT_TEST_CASE_NUM);
Al Stone afae4e
+            (long int) test_case, (int) AT_TEST_CASE_NUM);
Al Stone afae4e
         return (AtRetBadParam);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -438,7 +440,7 @@
Al Stone afae4e
     if (test_num < 0 || test_num > AtTestCase[test_case].TestsNum)
Al Stone afae4e
     {
Al Stone afae4e
         printf ("ACPICA API TS err: test num %ld is out of range 0 - %d\n",
Al Stone afae4e
-            test_num, AtTestCase[test_case].TestsNum);
Al Stone afae4e
+            (long int) test_num, AtTestCase[test_case].TestsNum);
Al Stone afae4e
         return (AtRetBadParam);
Al Stone afae4e
     }
Al Stone afae4e
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atnamespace.c acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atnamespace.c	2013-01-17 12:48:28.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c	2013-07-25 13:24:15.366466707 -0600
Al Stone a03e60
@@ -2535,7 +2535,8 @@
Al Stone afae4e
 #else
Al Stone afae4e
                 printf ("API Error: Address of %s (0x%llX) != (0x%llX)\n",
Al Stone afae4e
                     PathNames[2 * i + 1],
Al Stone afae4e
-                    Info->Address, ExpectedInfo[i].Address);
Al Stone afae4e
+                    (long long unsigned int) Info->Address,
Al Stone afae4e
+		    (long long unsigned int) ExpectedInfo[i].Address);
Al Stone afae4e
 #endif
Al Stone afae4e
 #else
Al Stone afae4e
                 printf ("API Error: Address of %s (0x%X) != (0x%X)\n",
Al Stone a03e60
@@ -2908,7 +2909,8 @@
Al Stone afae4e
         TestErrors++;
Al Stone afae4e
         printf ("AtGetNextObjectTypeCommon: different numbers of entities"
Al Stone afae4e
             "in TypesNames (%d) and LevelTypes0000 (%d)\n",
Al Stone afae4e
-            TypesCount, sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE));
Al Stone afae4e
+            TypesCount,
Al Stone afae4e
+	    (int) (sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE)));
Al Stone afae4e
         return (AE_ERROR);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -4192,7 +4194,9 @@
Al Stone afae4e
             Pathname, Obj.Integer.Value, Value);
Al Stone afae4e
 #else
Al Stone afae4e
         printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
Al Stone afae4e
-            Pathname, Obj.Integer.Value, Value);
Al Stone afae4e
+            Pathname,
Al Stone afae4e
+	    (long long unsigned int) Obj.Integer.Value,
Al Stone afae4e
+	    (long long unsigned int) Value);
Al Stone afae4e
 #endif
Al Stone afae4e
         Status = AE_ERROR;
Al Stone afae4e
     }
Al Stone a03e60
@@ -5199,7 +5203,7 @@
Al Stone afae4e
             {
Al Stone afae4e
                 AapiErrors++;
Al Stone afae4e
                 printf ("API Error: AcpiOsAllocate(%d) returned NULL\n",
Al Stone afae4e
-                    OutName.Length);
Al Stone afae4e
+                    (int) OutName.Length);
Al Stone afae4e
                 return (AE_ERROR);
Al Stone afae4e
             }
Al Stone afae4e
         }
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atosxfctrl.c acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atosxfctrl.c	2013-01-17 12:48:28.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c	2013-07-25 13:30:00.375492751 -0600
Al Stone a03e60
@@ -737,13 +737,15 @@
Al Stone afae4e
 #if ACPI_MACHINE_WIDTH == 64
Al Stone afae4e
 #ifdef    _MSC_VER
Al Stone afae4e
         printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%I64x\n",
Al Stone afae4e
+            Width, Address);
Al Stone afae4e
 #else
Al Stone afae4e
         printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%llx\n",
Al Stone afae4e
+            Width, (long long unsigned int) Address);
Al Stone afae4e
 #endif
Al Stone afae4e
 #else
Al Stone afae4e
         printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%x\n",
Al Stone afae4e
-#endif
Al Stone afae4e
             Width, Address);
Al Stone afae4e
+#endif
Al Stone afae4e
         return (NULL);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -764,15 +766,19 @@
Al Stone afae4e
 #ifdef    _MSC_VER
Al Stone afae4e
                 printf("OsxfCtrlFingReg: intersection Regs (0x%I64x: 0x%x)"
Al Stone afae4e
                     " and (0x%I64x: 0x%x)\n",
Al Stone afae4e
+                    Reg->Address, Reg->Width, Address, Width);
Al Stone afae4e
 #else
Al Stone afae4e
                 printf("OsxfCtrlFingReg: intersection Regs (0x%llx: 0x%x)"
Al Stone afae4e
                     " and (0x%llx: 0x%x)\n",
Al Stone afae4e
+                    (long long unsigned int) Reg->Address,
Al Stone afae4e
+		    Reg->Width,
Al Stone afae4e
+		    (long long unsigned int) Address, Width);
Al Stone afae4e
 #endif
Al Stone afae4e
 #else
Al Stone afae4e
                 printf("OsxfCtrlFingReg: intersection Regs (0x%x: 0x%x)"
Al Stone afae4e
                     " and (0x%x: 0x%x)\n",
Al Stone afae4e
-#endif
Al Stone afae4e
                     Reg->Address, Reg->Width, Address, Width);
Al Stone afae4e
+#endif
Al Stone afae4e
                 return (NULL);
Al Stone afae4e
             }
Al Stone afae4e
         }
Al Stone a03e60
@@ -786,13 +792,15 @@
Al Stone afae4e
 #if ACPI_MACHINE_WIDTH == 64
Al Stone afae4e
 #ifdef    _MSC_VER
Al Stone afae4e
             printf("OsxfCtrlFingReg: no memory for Reg (0x%I64x: 0x%x)\n",
Al Stone afae4e
+                Reg->Address, Reg->Width);
Al Stone afae4e
 #else
Al Stone afae4e
             printf("OsxfCtrlFingReg: no memory for Reg (0x%llx: 0x%x)\n",
Al Stone afae4e
+                (long long unsigned int) Reg->Address, Reg->Width);
Al Stone afae4e
 #endif
Al Stone afae4e
 #else
Al Stone afae4e
             printf("OsxfCtrlFingReg: no memory for Reg (0x%x: 0x%x)\n",
Al Stone afae4e
-#endif
Al Stone afae4e
                 Reg->Address, Reg->Width);
Al Stone afae4e
+#endif
Al Stone afae4e
             return (NULL);
Al Stone afae4e
         }
Al Stone afae4e
         Reg->Type = Type;
Al Stone a03e60
@@ -932,14 +940,19 @@
Al Stone afae4e
 #if ACPI_MACHINE_WIDTH == 64
Al Stone afae4e
 #ifdef    _MSC_VER
Al Stone afae4e
             printf("%.2u (%s Address 0x%I64x: Width %.2u) r/w counts: %u/%u\n",
Al Stone afae4e
+                i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
Al Stone afae4e
+                Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
Al Stone afae4e
 #else
Al Stone afae4e
             printf("%.2u (%s Address 0x%llx: Width %.2u) r/w counts: %u/%u\n",
Al Stone afae4e
+                i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
Al Stone afae4e
+                (long long unsigned int) Reg->Address,
Al Stone afae4e
+		Reg->Width, Reg->ReadCount, Reg->WriteCount);
Al Stone afae4e
 #endif
Al Stone afae4e
 #else
Al Stone afae4e
             printf("%.2u (%s Address 0x%.4x: Width %.2u) r/w counts: %u/%u\n",
Al Stone afae4e
-#endif
Al Stone afae4e
                 i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
Al Stone afae4e
                 Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
Al Stone afae4e
+#endif
Al Stone afae4e
             Reg = Reg->Next;
Al Stone afae4e
             i++;
Al Stone afae4e
         }
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/atresource.c acpica-unix2-20130626-aapits/tests/aapits/atresource.c
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/atresource.c	2013-01-17 12:48:29.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/atresource.c	2013-07-25 13:25:49.423565947 -0600
Al Stone a03e60
@@ -174,7 +174,7 @@
Al Stone afae4e
         AapiErrors++;
Al Stone afae4e
         printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
Al Stone afae4e
             " expected %d\n",
Al Stone afae4e
-            Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
+            Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
         return (AE_ERROR);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -490,7 +490,7 @@
Al Stone afae4e
         AapiErrors++;
Al Stone afae4e
         printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
Al Stone afae4e
             " expected %d\n",
Al Stone afae4e
-            Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
+            Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
         return (AE_ERROR);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -689,7 +689,7 @@
Al Stone afae4e
         AapiErrors++;
Al Stone afae4e
         printf ("Api Error: Resource->Length (%d) != %d\n",
Al Stone afae4e
             CurrentResource->Length,
Al Stone afae4e
-            ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ)));
Al Stone afae4e
+            (int) (ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ))));
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
     if (CurrentResource->Data.Irq.Triggering != 0) /* Level-Triggered */
Al Stone a03e60
@@ -981,7 +981,7 @@
Al Stone afae4e
         AapiErrors++;
Al Stone afae4e
         printf ("API Error: AcpiGetPossibleResources(%s) returned Length %d,"
Al Stone afae4e
             " expected %d\n",
Al Stone afae4e
-            Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
+            Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
Al Stone afae4e
         return (AE_ERROR);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone a03e60
@@ -1923,7 +1923,7 @@
Al Stone afae4e
         AapiErrors++;
Al Stone afae4e
         printf ("API Error: AcpiGetIrqRoutingTable(%s) returned Length %d,"
Al Stone afae4e
             " expected %d\n",
Al Stone afae4e
-            Pathname, OutBuffer.Length, 0xA48);
Al Stone afae4e
+            Pathname, (int) OutBuffer.Length, 0xA48);
Al Stone afae4e
         return (AE_ERROR);
Al Stone afae4e
     }
Al Stone afae4e
Al Stone afae4e
diff -urN acpica-unix2-20130626/tests/aapits/Makefile acpica-unix2-20130626-aapits/tests/aapits/Makefile
Al Stone afae4e
--- acpica-unix2-20130626/tests/aapits/Makefile	2013-01-17 12:48:29.000000000 -0700
Al Stone afae4e
+++ acpica-unix2-20130626-aapits/tests/aapits/Makefile	2013-07-25 15:17:09.309236422 -0600
Al Stone 6794d0
@@ -194,7 +194,7 @@
Al Stone afae4e
 CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../source/include 
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone afae4e
-acpiexec : $(patsubst %.c,%.o, $(SRCS))
Al Stone afae4e
+$(PROG) : $(patsubst %.c,%.o, $(SRCS))
Al Stone afae4e
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)
Al Stone afae4e
 
Al Stone afae4e
 CLEANFILES= $(PROG)