#include <yaz/yaz-version.h>
#ifndef YAZ_VERSIONL
-#error YAZ version 4.0 or later must be used.
-#elif YAZ_VERSIONL < 0x040000
-#error YAZ version 4.0 or later must be used.
+#error YAZ version 3.0 or later must be used.
+#elif YAZ_VERSIONL < 0x030000
+#error YAZ version 3.0 or later must be used.
#endif
#ifdef PHP_WIN32
#include <yaz/oid_db.h>
#include <yaz/zoom.h>
+#ifndef ODR_INT_PRINTF
+#define ODR_INT_PRINTF %d
+#endif
+
#define MAX_ASSOC 200
typedef struct Yaz_AssociationInfo *Yaz_Association;
if (e->tagValue->which == Z_StringOrNumeric_numeric)
{
- sprintf(tagstr, "%d", *e->tagValue->u.numeric);
+ sprintf(tagstr, ODR_INT_PRINTF, *e->tagValue->u.numeric);
tag = tagstr;
}
else if (e->tagValue->which == Z_StringOrNumeric_string)
const char *tag = 0;
if (e->tagValue->which == Z_StringOrNumeric_numeric)
{
- sprintf(tagstr, "%d", *e->tagValue->u.numeric);
+ sprintf(tagstr, ODR_INT_PRINTF, *e->tagValue->u.numeric);
tag = tagstr;
}
else if (e->tagValue->which == Z_StringOrNumeric_string)
const char *tag = 0;
if (e->tagValue->which == Z_StringOrNumeric_numeric)
{
- sprintf(tagstr, "%d", *e->tagValue->u.numeric);
+ sprintf(tagstr, ODR_INT_PRINTF, *e->tagValue->u.numeric);
tag = tagstr;
}
else if (e->tagValue->which == Z_StringOrNumeric_string)
memcpy(tag + taglen, e->tagValue->u.string, len);
tag[taglen+len] = '\0';
} else if (e->tagValue->which == Z_StringOrNumeric_numeric) {
- sprintf(tag + taglen, "%d", *e->tagValue->u.numeric);
+ sprintf(tag + taglen, ODR_INT_PRINTF, *e->tagValue->u.numeric);
}
taglen = strlen(tag);
strcpy(tag + taglen, ")");
get_assoc(INTERNAL_FUNCTION_PARAM_PASSTHRU, pval_id, &p);
if (p && p->zoom_scan) {
int pos = 0;
+ /* ZOOM_scanset_term changed from YAZ 3 to YAZ 4 */
+#if YAZ_VERSIONL >= 0x040000
size_t occ, len;
+#else
+ int occ, len;
+#endif
int size = ZOOM_scanset_size(p->zoom_scan);
for (pos = 0; pos < size; pos++) {