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

cmd/cgo: Go name for C typedefs is difficult to predict, and is undocumented #4255

Closed
gopherbot opened this issue Oct 17, 2012 · 3 comments
Closed
Milestone

Comments

@gopherbot
Copy link

by yargevad:

What steps will reproduce the problem?
http://play.golang.org/p/QL9XPbC_wf

What is the expected output?
Successful compilation

What do you see instead?
timeval.go:14[...]: cannot use tv.Sec (type int64) as type
_Ctype___darwin_time_t in assignment
timeval.go:15[...]: cannot use tv.Usec (type int32) as type
_Ctype___darwin_suseconds_t in assignment

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
OSX 10.7.5

Which version are you using?  (run 'go version')
$ go version
go version go1.0.3

Please provide any additional information below.
The example code provided is trivial and useless. That's the shortest way I know of to
illustrate what I'm seeing, even though that same functionality is available using the
syscall package. I'm integrating against a C library that has functions that take
'struct timeval's as parameters.
@minux
Copy link
Member

minux commented Oct 20, 2012

Comment 2:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 3:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Feb 1, 2013

Comment 4:

This issue was closed by revision 32a6097.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants