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

string.h on some systems needs __USE_XOPEN2K8 defined #136

Closed
rcallahan opened this issue May 6, 2014 · 3 comments
Closed

string.h on some systems needs __USE_XOPEN2K8 defined #136

rcallahan opened this issue May 6, 2014 · 3 comments

Comments

@rcallahan
Copy link

On older systems like CentOS, string.h needs __USE_XOPEN2K8 defined to import xlocale.h.

Adding CC-options: "-D__USE_XOPEN2K8" made the package build.

Building network-2.5.0.0...
Preprocessing library network-2.5.0.0...
In file included from dist/dist-sandbox-fe773bef/build/Network/BSD_hsc_utils.c:2:0:
/usr/include/string.h:548:5: error: unknown type name ‘__locale_t’
__locale_t __loc)
^
/usr/include/string.h:552:18: error: unknown type name ‘__locale_t’
size_t __n, __locale_t __loc)
^
compiling dist/dist-sandbox-fe773bef/build/Network/BSD_hsc_utils.c failed (exit code 1)

@tibbe
Copy link
Member

tibbe commented May 6, 2014

I don't think we should add -D__USE_XOPEN2K8 unconditionally. Is there a way to detect if you're on these systems?

@rcallahan
Copy link
Author

Yeah, I should clarify that that was not intended as a proposed patch in the general case. I'm not sure of a good way to do it, without knowing what other systems have this sort of feature in string.h.

@kazu-yamamoto
Copy link
Collaborator

We should use _GNU_SOURCE instead of __USE_XOPEN2K8: https://stackoverflow.com/questions/13879302/purpose-of-use-xopen2k8-and-how-to-set-it

And 64a3779 does it.

So, let's close this.

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

No branches or pull requests

3 participants