summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-30 10:57:00 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-30 10:57:00 +0000
commitca21147618240b2df107f184413c6a9aaefaf7c0 (patch)
treef1659a84caad906e7e73415db00219601b6cfc0b /lib
parent999d86cf39b39d1c02fd318f777be7e9491bea9e (diff)
downloadquilt-ca21147618240b2df107f184413c6a9aaefaf7c0.tar.gz
- Allow backup-files to build on windows using the MinGW compiler.
Diffstat (limited to 'lib')
-rw-r--r--lib/backup-files.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/backup-files.c b/lib/backup-files.c
index d2979d0..268fb49 100644
--- a/lib/backup-files.c
+++ b/lib/backup-files.c
@@ -50,6 +50,17 @@
# define PATH_MAX 4096
#endif
+#ifdef __MINGW32__
+#define mkdir(x,y) mkdir(x)
+/* Symlinks are not supported */
+#define lstat stat
+static int link(const char *oldpath, const char *newpath)
+{
+ errno = ENOSYS;
+ return -1;
+}
+#endif
+
const char *progname;
enum { what_noop, what_backup, what_restore, what_remove };