gdraheim / zziplib

The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access
Other
62 stars 50 forks source link

`cp -s` is not portable #31

Closed mojca closed 6 years ago

mojca commented 6 years ago

make check fails on macOS due to unportable cp -s. What about using ln -s?

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/cp.1.html

mojca commented 6 years ago

Besides that it would help if python one line below was not hardcoded directly, but rather used as a $(PYTHON) (or @PYTHON@) variable which should already be available from configure results, otherwise it's not predictable which version of python would be used.

gdraheim commented 6 years ago

The usage of "cp -s $file ." can be replaced by "ln -s $file . | cp $file ."

mojca commented 6 years ago

Thanks for both patches. Looks good. (Are there indeed cases when ln -s is not available?)

gdraheim commented 6 years ago

Well, the filesystem needs to support that special file kind - only the unix'ish ones do have it always. Even ntfs may have its problems about it (although the latest unix-wrappers should be able to use the fstype feature).

gdraheim commented 6 years ago

done.