#need the defines for PRId64
AC_CHECK_SIZEOF(int64_t)
AC_CHECK_SIZEOF(long)
+#need the defines for PRIuSIZE
+AC_CHECK_SIZEOF(size_t)
#need the define for overflow checks
AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(size_t)
#include <sys/ipc.h>
#include <sys/msg.h>])
+# check for compiler support of %zu printf macro
+AH_TEMPLATE(PRIuSIZE,[Compiler supports %zu printf macro])
+AC_MSG_CHECKING([for compiler %zu support])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+ ]],[[size_t n=1;printf("%zu",n);]])],[
+ AC_DEFINE(PRIuSIZE,"zu")
+ AC_MSG_RESULT(yes)
+ ],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
+
+
dnl Check for special functions
AC_FUNC_ALLOCA
*(dbuf) = '\0';
} else {
/* FAIL */
- debug("local_printfx() FAILURE: %zd\n", x);
+ debug("local_printfx() FAILURE: %" PRIuSIZE "\n", x);
}
/* stdout needs to be flushed for it to work with Squid */
DisplayVersion();
local_printfx("\n");
local_printfx("Configuration:\n");
- local_printfx(" EDUI_MAXLEN: %zd\n", EDUI_MAXLEN);
+ local_printfx(" EDUI_MAXLEN: %u\n", EDUI_MAXLEN);
if (edui_conf.mode & EDUI_MODE_DEBUG)
local_printfx(" Debug mode: ON\n");
else
memcpy(bufa, l->val[i]->bv_val, j);
z = BinarySplit(bufa, j, '#', bufb, sizeof(bufb));
/* BINARY DEBUGGING *
- local_printfx("value[%zd]: BinarySplit(", (size_t) i);
+ local_printfx("value[%" PRIuSIZE "]: BinarySplit(", (size_t) i);
for (k = 0; k < z; k++) {
c = (int) bufb[k];
if (c < 0)
c = c + 256;
local_printfx("%02X", c);
}
- local_printfx("): %zd\n", (size_t) z);
+ local_printfx("): %" PRIuSIZE "\n", (size_t) z);
* BINARY DEBUGGING */
z = j - z - 1;
j = atoi(bufb);
edui_elap = 0;
k = strlen(bufa);
/* BINARY DEBUGGING *
- local_printfx("while() -> bufa[%zd]: %s", k, bufa);
+ local_printfx("while() -> bufa[%" PRIuSIZE "]: %s", k, bufa);
for (i = 0; i < k; i++)
local_printfx("%02X", bufa[i]);
local_printfx("\n");
/* If we got a group string, split it */
if (p != NULL) {
/* Split string */
- debug("StringSplit(%s, ' ', %s, %zd)\n", bufa, bufb, sizeof(bufb));
+ debug("StringSplit(%s, ' ', %s, %" PRIuSIZE ")\n", bufa, bufb, sizeof(bufb));
i = StringSplit(bufa, ' ', bufb, sizeof(bufb));
if (i > 0) {
- debug("StringSplit(%s, %s) done. Result: %zd\n", bufa, bufb, i);
+ debug("StringSplit(%s, %s) done. Result: %" PRIuSIZE "\n", bufa, bufb, i);
/* Got a group to match against */
x = ConvertIP(&edui_ldap, bufb);
if (x < 0) {
}
}
} else {
- debug("StringSplit() -> Error: %zu\n", i);
- local_printfx("ERR (StringSplit Error %d)\n", i);
+ debug("StringSplit() -> Error: %" PRIuSIZE "\n", i);
+ local_printfx("ERR (StringSplit Error %" PRIuSIZE ")\n", i);
}
} else {
/* No group to match against, only an IP */