From 627e8aff063333dd92ca4f38674e816c3fb9bc8b Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 7 May 2020 23:17:37 +0200 Subject: [PATCH] plugin.zsh,myflock/c.h: Support Cygwin --- myflock/c.h | 2 ++ zconvey.plugin.zsh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/myflock/c.h b/myflock/c.h index dd8f9a4..311ac41 100644 --- a/myflock/c.h +++ b/myflock/c.h @@ -210,8 +210,10 @@ static inline __attribute__((const)) int is_power_of_2(unsigned long num) } #ifndef HAVE_LOFF_T +#ifndef __CYGWIN__ typedef int64_t loff_t; #endif +#endif #if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0) && defined(HAVE_DIR_DD_FD) #include diff --git a/zconvey.plugin.zsh b/zconvey.plugin.zsh index 742a138..826eef7 100644 --- a/zconvey.plugin.zsh +++ b/zconvey.plugin.zsh @@ -187,7 +187,7 @@ function zc-id() { # flock in Zsh ver. < 5.3 doesn't) - util-linux/flock stripped # of some things, compiles hopefully everywhere (tested on OS X, # Linux, FreeBSD). -if [[ ! -e "${ZCONVEY_REPO_DIR}/myflock/flock" ]]; then +if [[ ! -e "${ZCONVEY_REPO_DIR}/myflock/flock" && ! -e "${ZCONVEY_REPO_DIR}/myflock/flock.exe" ]]; then ( if zmodload zsh/system 2>/dev/null; then if zsystem flock -t 1 "${ZCONVEY_REPO_DIR}/myflock/LICENSE"; then