#include "config.h"
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
-
#include <stdio.h>
#include <stdlib.h>
tv.tv_usec = 0;
time_reg = uuid_time(buf, &tv);
printf("UUID generated at %lu reports %lu (%ld.%ld)\n",
- time_gen, time_reg, tv.tv_sec, (long)tv.tv_usec);
+ (unsigned long)time_gen, (unsigned long)time_reg,
+ (long)tv.tv_sec, (long)tv.tv_usec);
/* allow 1s margin in case of rollover between sampling
* the current time and when the UUID is generated. */
if (time_reg > time_gen + 1) {
printf("UUID time comparison succeeded.\n");
}
- uuid_parse(str, tst);
+ if (uuid_parse(str, tst) < 0) {
+ printf("UUID parse failed\n");
+ failed++;
+ }
if (!uuid_compare(buf, tst)) {
printf("UUID parse and compare succeeded.\n");
} else {