Index: ChangeLog
===================================================================
--- ChangeLog	(revision 5836)
+++ ChangeLog	(revision 5837)
@@ -9,4 +9,5 @@
 	* Added half of the support for AppSched Triggers
 	  ABOUT, HELP and PREFERENCES.
+	* Avoid %llX on win32 (Closes: #271)
 
 v. 1.0beta8 - Mon Dec 10 2012 12:42 CET
Index: include/roaraudio/targethacks.h
===================================================================
--- include/roaraudio/targethacks.h	(revision 5823)
+++ include/roaraudio/targethacks.h	(revision 5837)
@@ -77,4 +77,13 @@
 #endif
 
+// funny printf() hacks:
+#ifdef ROAR_TARGET_WIN32
+#define LIBROAR__longlong long
+#define LIBROAR__ll       "l"
+#else
+#define LIBROAR__longlong long long
+#define LIBROAR__ll       "ll"
+#endif
+
 #endif
 
Index: libroar/hash.c
===================================================================
--- libroar/hash.c	(revision 5823)
+++ libroar/hash.c	(revision 5837)
@@ -298,5 +298,5 @@
       break;
     }
-    snprintf(out, outlen-1, "%lli", tmp.llsi);
+    snprintf(out, outlen-1, "%" LIBROAR__ll "i", (LIBROAR__longlong int)tmp.llsi);
    break;
   default:
Index: libroar/libroar.c
===================================================================
--- libroar/libroar.c	(revision 5823)
+++ libroar/libroar.c	(revision 5837)
@@ -123,5 +123,5 @@
  return 0;
 #else
- ROAR_ERR("roar_usleep(t=%llu): can not sleep: not implemented", (long long unsigned int)t);
+ ROAR_ERR("roar_usleep(t=%" LIBROAR__ll "u): can not sleep: not implemented", (LIBROAR__longlong unsigned int)t);
  roar_strap(ROAR_TRAP_GROUP_LIBROAR, "usleep.not-implemented");
  roar_err_set(ROAR_ERROR_NOSYS);
Index: plugins/roard/protocol-gopher.c
===================================================================
--- plugins/roard/protocol-gopher.c	(revision 5823)
+++ plugins/roard/protocol-gopher.c	(revision 5837)
@@ -114,14 +114,14 @@
           "Server description: %s\r\n"
           "\r\n"
-          "Counters current:   %llu clients, %llu streams\r\n"
-          "Counters sum:       %llu clients, %llu streams\r\n",
+          "Counters current:   %" LIBROAR__ll "u clients, %" LIBROAR__ll "u streams\r\n"
+          "Counters sum:       %" LIBROAR__ll "u clients, %" LIBROAR__ll "u streams\r\n",
           pluginpara->appname    == NULL ? "***unknown***" : pluginpara->appname,
           pluginpara->abiversion == NULL ? "***unknown***" : pluginpara->abiversion,
           g_config->location,
           g_config->description,
-          (long long unsigned int)g_counters.cur.clients,
-          (long long unsigned int)g_counters.cur.streams,
-          (long long unsigned int)g_counters.sum.clients,
-          (long long unsigned int)g_counters.sum.streams
+          (LIBROAR__longlong unsigned int)g_counters.cur.clients,
+          (LIBROAR__longlong unsigned int)g_counters.cur.streams,
+          (LIBROAR__longlong unsigned int)g_counters.sum.clients,
+          (LIBROAR__longlong unsigned int)g_counters.sum.streams
          );
 
Index: roarclients/roarctl.c
===================================================================
--- roarclients/roarctl.c	(revision 5823)
+++ roarclients/roarctl.c	(revision 5837)
@@ -340,5 +340,5 @@
 
  if ( g_verbose ) {
-  printf("Server time           : %s%s%s%llu.%06llu [+%llu/2^64] sec\n",
+  printf("Server time           : %s%s%s%" LIBROAR__ll "u.%06" LIBROAR__ll "u [+%" LIBROAR__ll "u/2^64] sec\n",
 #ifdef ROAR_HAVE_CTIME_R
          "\"",
@@ -348,10 +348,10 @@
          "", "", "",
 #endif
-         (long long unsigned int)time.t_sec,
-         (long long unsigned int) time.t_ssec / 18446744073709LLU,
-         (long long unsigned int) time.t_ssec);
+         (LIBROAR__longlong unsigned int)time.t_sec,
+         (LIBROAR__longlong unsigned int) time.t_ssec / 18446744073709LLU,
+         (LIBROAR__longlong unsigned int) time.t_ssec);
  } else {
   if ( time.c_freq == 1000000000LL && time.t_ssec == 0 ) {
-   printf("Server time           : %s%s%s%llu sec\n",
+   printf("Server time           : %s%s%s%" LIBROAR__ll "u sec\n",
 #ifdef ROAR_HAVE_CTIME_R
          "\"",
@@ -361,7 +361,7 @@
          "", "", "",
 #endif
-          (long long unsigned int)time.t_sec);
+          (LIBROAR__longlong unsigned int)time.t_sec);
   } else {
-   printf("Server time           : %s%s%s%llu.%06llu sec\n",
+   printf("Server time           : %s%s%s%" LIBROAR__ll "u.%06" LIBROAR__ll"u sec\n",
 #ifdef ROAR_HAVE_CTIME_R
          "\"",
@@ -371,6 +371,6 @@
          "", "", "",
 #endif
-          (long long unsigned int)time.t_sec,
-          (long long unsigned int) time.t_ssec / 18446744073709LLU);
+          (LIBROAR__longlong unsigned int)time.t_sec,
+          (LIBROAR__longlong unsigned int) time.t_ssec / 18446744073709LLU);
   }
  }
@@ -379,9 +379,9 @@
  if ( time.c_drift ) {
 #ifdef ROAR_HAVE_LIBM
-  printf("Server clock drift    : %llu:2^64 (~10^%f)\n",
-         (long long unsigned int)time.c_drift, logf((float)time.c_drift)/2.302585f);
+  printf("Server clock drift    : %" LIBROAR__ll "u:2^64 (~10^%f)\n",
+         (LIBROAR__longlong unsigned int)time.c_drift, logf((float)time.c_drift)/2.302585f);
 #else
-  printf("Server clock drift    : %llu:2^64\n",
-         (long long unsigned int)time.c_drift);
+  printf("Server clock drift    : %" LIBROAR__ll "u:2^64\n",
+         (LIBROAR__longlong unsigned int)time.c_drift);
 #endif
  }
@@ -1193,5 +1193,5 @@
 
  for (i = 0; i < ret; i++) {
-  printf("profile %lli:\n", (long long signed int)i);
+  printf("profile %" LIBROAR__ll "i:\n", (LIBROAR__longlong signed int)i);
   show_aiprofile(list[i]);
  }
Index: roard/emul_rsound.c
===================================================================
--- roard/emul_rsound.c	(revision 5823)
+++ roard/emul_rsound.c	(revision 5837)
@@ -284,5 +284,5 @@
   ptr /= 8; // bits -> bytes
 
-  i = snprintf(msg.data+msg.datalen, EMUL_RSOUND_MSG_DATA_LEN - msg.datalen, " %lld", (long long int)ptr);
+  i = snprintf(msg.data+msg.datalen, EMUL_RSOUND_MSG_DATA_LEN - msg.datalen, " %" LIBROAR__ll "d", (LIBROAR__longlong int)ptr);
 
   msg.datalen += i;
Index: roard/roard.c
===================================================================
--- roard/roard.c	(revision 5823)
+++ roard/roard.c	(revision 5837)
@@ -341,5 +341,5 @@
 
 #define _pmsg(format, args...) roar_debug_msg(type, __LINE__, __FILE__, ROAR_DBG_PREFIX, format, ## args)
-#define _pmsgc(group, counter, name) _pmsg("  Counter %-10s: %llu", (name), (long long unsigned int)(counters->group.counter))
+#define _pmsgc(group, counter, name) _pmsg("  Counter %-10s: %" LIBROAR__ll "u", (name), (LIBROAR__longlong unsigned int)(counters->group.counter))
 void counters_print(int type, int force) {
  struct counters * counters = counters_getptr();
