-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cgo: chokes on quoted defines #26025
Comments
/cc @ianlancetaylor |
We take a cautious approach to the characters permitted in The I'm going to close this as working-as-expected. Please comment if you disagree. |
@ianlancetaylor That seems a reasonable explanation and restriction. Perhaps one suggestion would be to add a note about it to https://golang.org/cmd/cgo/ so people have a means to find this limitation. |
Change https://golang.org/cl/120975 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.10.1 linux/amd64
Does this issue reproduce with the latest release?
I guess, don't see why it wouldn't :P
What operating system and processor architecture are you using (
go env
)?What did you do?
Some C libraries (e.g. openssl) expect/require macros containing a quoted string. However, CGO chokes on quotes failing with malformed argument errors:
What did you expect to see?
I expect this file to build/run successfully.
What did you see instead?
Note, I can hack around this issue by replacing the CGO preamble statement with a direct define
but the issue is that I would need to inject this into all CGO enabled Go files, opposed to just having a single CGO preamble file for all the sources.
The text was updated successfully, but these errors were encountered: