plugin.zsh,myflock/c.h: Support Cygwin

This commit is contained in:
Sebastian Gniazdowski 2020-05-07 23:17:37 +02:00
parent 6df790888a
commit 627e8aff06
2 changed files with 3 additions and 1 deletions

View file

@ -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 <sys/types.h>

View file

@ -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