projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
msvc support
[awesomized/libmemcached]
/
src
/
bin
/
memcp.cc
diff --git
a/src/bin/memcp.cc
b/src/bin/memcp.cc
index eb7151e65a8680155b565cd1a8870cae48e84792..7ad8678717b315a52437dba9e9e7ae91685c0c33 100644
(file)
--- a/
src/bin/memcp.cc
+++ b/
src/bin/memcp.cc
@@
-25,10
+25,20
@@
#include <cerrno>
#include <climits>
#include <cstdlib>
#include <cerrno>
#include <climits>
#include <cstdlib>
-#include <libgen.h>
+#if HAVE_LIBGEN_H
+# include <libgen.h>
+#endif
#include <fstream>
#include <sstream>
#include <fstream>
#include <sstream>
+#ifndef PATH_MAX
+# ifdef MAX_PATH
+# define PATH_MAX MAX_PATH
+# else
+# define PATH_MAX 256
+# endif
+#endif
+
struct memcp_file {
enum class type {
basename,
struct memcp_file {
enum class type {
basename,
@@
-130,7
+140,7
@@
static bool path2key(const client_options &opt, memcp_file &file, char **path) {
} else if (file.key == memcp_file::type::relative) {
*path = file.path;
} else {
} else if (file.key == memcp_file::type::relative) {
*path = file.path;
} else {
- *path = basename(
(file.path)
);
+ *path = basename(
file.path
);
}
return true;
}
}
return true;
}