#include <string.h>
#include <stdlib.h>
#include <zlib.h>
-#ifndef _WIN32
-#define CALLBACK
+#if !defined(_WIN32) && !defined(NO_DYLIB)
#include <dlfcn.h>
-#else
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#endif
#include "cdrcimg.h"
+#undef CALLBACK
+#define CALLBACK
+
#define PFX "cdrcimg: "
#define err(f, ...) fprintf(stderr, PFX f, ##__VA_ARGS__)
return -1;
}
}
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(NO_DYLIB)
if (pBZ2_bzBuffToBuffDecompress == NULL) {
void *h = dlopen("/usr/lib/libbz2.so.1", RTLD_LAZY);
if (h == NULL)
char *ext;
FILE *f = NULL;
+ printf("%s cd_file=%d\n", __func__, cd_file == NULL ? 0 : 1);
+
if (cd_file != NULL)
return 0; // it's already open