Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] conditional compilation around at_fdcwd , at_symlink_follow #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ocramz
Copy link

@ocramz ocramz commented May 7, 2021

On Mac OSX, with an old XCode and glibc, unliftio doesn't compile :( ( #59 ).
I've tried adding a build flag around the problem but I can't get it to propagate down to GCC.

I understand supporting old systems might not be high in priority but I figured a change along these lines would be minimally disruptive (and allow me to use unliftio on my janky old laptop!)

Looking forward to all feedback.

@@ -22,6 +22,11 @@ extra-source-files:
README.md
ChangeLog.md

flag old-glibc
description: compile with post-2016 glibc, allowing atomic file writes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the logic is reversed here. This flag seems to enable the old glibc.

flag old-glibc
description: compile with post-2016 glibc, allowing atomic file writes
default: False
manual: False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be manual: True, right? We don't want the dep solver trying to change this flag.

@@ -89,7 +89,7 @@ import Data.ByteString as B (ByteString, writeFile)
import Control.Monad.IO.Unlift
import UnliftIO.IO (Handle, IOMode(..), withBinaryFile)

#if WINDOWS
#if (WINDOWS || OLD-GLIBC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have some kind of a changelog entry explaining this change and what the impact of enabling the flag would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants