Changeset 5837:96349d1c8634 in roaraudio


Ignore:
Timestamp:
01/06/13 23:33:14 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Avoid %llX on win32 (Closes: #271)

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5836 r5837  
    99        * Added half of the support for AppSched Triggers 
    1010          ABOUT, HELP and PREFERENCES. 
     11        * Avoid %llX on win32 (Closes: #271) 
    1112 
    1213v. 1.0beta8 - Mon Dec 10 2012 12:42 CET 
  • include/roaraudio/targethacks.h

    r5823 r5837  
    7777#endif 
    7878 
     79// funny printf() hacks: 
     80#ifdef ROAR_TARGET_WIN32 
     81#define LIBROAR__longlong long 
     82#define LIBROAR__ll       "l" 
     83#else 
     84#define LIBROAR__longlong long long 
     85#define LIBROAR__ll       "ll" 
     86#endif 
     87 
    7988#endif 
    8089 
  • libroar/hash.c

    r5823 r5837  
    298298      break; 
    299299    } 
    300     snprintf(out, outlen-1, "%lli", tmp.llsi); 
     300    snprintf(out, outlen-1, "%" LIBROAR__ll "i", (LIBROAR__longlong int)tmp.llsi); 
    301301   break; 
    302302  default: 
  • libroar/libroar.c

    r5823 r5837  
    123123 return 0; 
    124124#else 
    125  ROAR_ERR("roar_usleep(t=%llu): can not sleep: not implemented", (long long unsigned int)t); 
     125 ROAR_ERR("roar_usleep(t=%" LIBROAR__ll "u): can not sleep: not implemented", (LIBROAR__longlong unsigned int)t); 
    126126 roar_strap(ROAR_TRAP_GROUP_LIBROAR, "usleep.not-implemented"); 
    127127 roar_err_set(ROAR_ERROR_NOSYS); 
  • plugins/roard/protocol-gopher.c

    r5823 r5837  
    114114          "Server description: %s\r\n" 
    115115          "\r\n" 
    116           "Counters current:   %llu clients, %llu streams\r\n" 
    117           "Counters sum:       %llu clients, %llu streams\r\n", 
     116          "Counters current:   %" LIBROAR__ll "u clients, %" LIBROAR__ll "u streams\r\n" 
     117          "Counters sum:       %" LIBROAR__ll "u clients, %" LIBROAR__ll "u streams\r\n", 
    118118          pluginpara->appname    == NULL ? "***unknown***" : pluginpara->appname, 
    119119          pluginpara->abiversion == NULL ? "***unknown***" : pluginpara->abiversion, 
    120120          g_config->location, 
    121121          g_config->description, 
    122           (long long unsigned int)g_counters.cur.clients, 
    123           (long long unsigned int)g_counters.cur.streams, 
    124           (long long unsigned int)g_counters.sum.clients, 
    125           (long long unsigned int)g_counters.sum.streams 
     122          (LIBROAR__longlong unsigned int)g_counters.cur.clients, 
     123          (LIBROAR__longlong unsigned int)g_counters.cur.streams, 
     124          (LIBROAR__longlong unsigned int)g_counters.sum.clients, 
     125          (LIBROAR__longlong unsigned int)g_counters.sum.streams 
    126126         ); 
    127127 
  • roarclients/roarctl.c

    r5823 r5837  
    340340 
    341341 if ( g_verbose ) { 
    342   printf("Server time           : %s%s%s%llu.%06llu [+%llu/2^64] sec\n", 
     342  printf("Server time           : %s%s%s%" LIBROAR__ll "u.%06" LIBROAR__ll "u [+%" LIBROAR__ll "u/2^64] sec\n", 
    343343#ifdef ROAR_HAVE_CTIME_R 
    344344         "\"", 
     
    348348         "", "", "", 
    349349#endif 
    350          (long long unsigned int)time.t_sec, 
    351          (long long unsigned int) time.t_ssec / 18446744073709LLU, 
    352          (long long unsigned int) time.t_ssec); 
     350         (LIBROAR__longlong unsigned int)time.t_sec, 
     351         (LIBROAR__longlong unsigned int) time.t_ssec / 18446744073709LLU, 
     352         (LIBROAR__longlong unsigned int) time.t_ssec); 
    353353 } else { 
    354354  if ( time.c_freq == 1000000000LL && time.t_ssec == 0 ) { 
    355    printf("Server time           : %s%s%s%llu sec\n", 
     355   printf("Server time           : %s%s%s%" LIBROAR__ll "u sec\n", 
    356356#ifdef ROAR_HAVE_CTIME_R 
    357357         "\"", 
     
    361361         "", "", "", 
    362362#endif 
    363           (long long unsigned int)time.t_sec); 
     363          (LIBROAR__longlong unsigned int)time.t_sec); 
    364364  } else { 
    365    printf("Server time           : %s%s%s%llu.%06llu sec\n", 
     365   printf("Server time           : %s%s%s%" LIBROAR__ll "u.%06" LIBROAR__ll"u sec\n", 
    366366#ifdef ROAR_HAVE_CTIME_R 
    367367         "\"", 
     
    371371         "", "", "", 
    372372#endif 
    373           (long long unsigned int)time.t_sec, 
    374           (long long unsigned int) time.t_ssec / 18446744073709LLU); 
     373          (LIBROAR__longlong unsigned int)time.t_sec, 
     374          (LIBROAR__longlong unsigned int) time.t_ssec / 18446744073709LLU); 
    375375  } 
    376376 } 
     
    379379 if ( time.c_drift ) { 
    380380#ifdef ROAR_HAVE_LIBM 
    381   printf("Server clock drift    : %llu:2^64 (~10^%f)\n", 
    382          (long long unsigned int)time.c_drift, logf((float)time.c_drift)/2.302585f); 
     381  printf("Server clock drift    : %" LIBROAR__ll "u:2^64 (~10^%f)\n", 
     382         (LIBROAR__longlong unsigned int)time.c_drift, logf((float)time.c_drift)/2.302585f); 
    383383#else 
    384   printf("Server clock drift    : %llu:2^64\n", 
    385          (long long unsigned int)time.c_drift); 
     384  printf("Server clock drift    : %" LIBROAR__ll "u:2^64\n", 
     385         (LIBROAR__longlong unsigned int)time.c_drift); 
    386386#endif 
    387387 } 
     
    11931193 
    11941194 for (i = 0; i < ret; i++) { 
    1195   printf("profile %lli:\n", (long long signed int)i); 
     1195  printf("profile %" LIBROAR__ll "i:\n", (LIBROAR__longlong signed int)i); 
    11961196  show_aiprofile(list[i]); 
    11971197 } 
  • roard/emul_rsound.c

    r5823 r5837  
    284284  ptr /= 8; // bits -> bytes 
    285285 
    286   i = snprintf(msg.data+msg.datalen, EMUL_RSOUND_MSG_DATA_LEN - msg.datalen, " %lld", (long long int)ptr); 
     286  i = snprintf(msg.data+msg.datalen, EMUL_RSOUND_MSG_DATA_LEN - msg.datalen, " %" LIBROAR__ll "d", (LIBROAR__longlong int)ptr); 
    287287 
    288288  msg.datalen += i; 
  • roard/roard.c

    r5823 r5837  
    341341 
    342342#define _pmsg(format, args...) roar_debug_msg(type, __LINE__, __FILE__, ROAR_DBG_PREFIX, format, ## args) 
    343 #define _pmsgc(group, counter, name) _pmsg("  Counter %-10s: %llu", (name), (long long unsigned int)(counters->group.counter)) 
     343#define _pmsgc(group, counter, name) _pmsg("  Counter %-10s: %" LIBROAR__ll "u", (name), (LIBROAR__longlong unsigned int)(counters->group.counter)) 
    344344void counters_print(int type, int force) { 
    345345 struct counters * counters = counters_getptr(); 
Note: See TracChangeset for help on using the changeset viewer.