Browse Source

Support libmagic 5.09

master
Bob Rudis 6 years ago
parent
commit
abb5160ff0
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 12
      src/wand.cpp

12
src/wand.cpp

@ -40,7 +40,11 @@ DataFrame incant(CharacterVector path, std::string magic_db="system") {
const char *mdb;
std::string mdbcpp;
#ifndef MAGIC_VERSION
int version = 500;
#else
int version = magic_version();
#endif
if (magic_db == "system") {
mdb = NULL;
@ -147,4 +151,10 @@ DataFrame incant(CharacterVector path, std::string magic_db="system") {
}
// [[Rcpp::export]]
int lib_version() { return(magic_version()); }
int lib_version() {
#ifndef MAGIC_VERSION
return(500);
#else
return(magic_version());
#endif
}

Loading…
Cancel
Save