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