]> git.ozlabs.org Git - ccan/blobdiff - ccan/cpuid/_info
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / cpuid / _info
index b6e0caf7b1dd402b7bde0aea44fbf468b8d1cc30..5699a2cc8173d6eaf82b2f0de18cd7a5f6c1eb66 100644 (file)
@@ -1,3 +1,7 @@
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+
 #include "cpuid.h"
 
 /**
  *
  * Example:
  * #include <ccan/cpuid/cpuid.h>
+ * #include <stdio.h>
  *
- * int main()
+ * int main(void)
  * {
- *     int highest;
- *     cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
- *     printf ("Highest extended function supported: %d\n", highest);
+ *     uint32_t highest;
+ *     cpuid(CPUID_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);
+ *     printf("Highest extended function supported: %d\n", highest);
  *
  *      return 0;
  * }
@@ -29,7 +34,12 @@ int main(int argc, char *argv[])
                return 1;
 
        if (strcmp(argv[1], "depends") == 0) {
+#if defined(__i386__) || defined(__i386) || defined(__x86_64) \
+               || defined(_M_AMD64) || defined(__M_X64)
                /* Nothing.  */
+#else
+               printf("ccan/build_assert\n");
+#endif
                return 0;
        }