LEFT | RIGHT |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build !noncgo_net | 5 // +build !netgo |
6 // +build darwin freebsd linux netbsd openbsd | 6 // +build darwin freebsd linux netbsd openbsd |
7 | 7 |
8 package net | 8 package net |
9 | 9 |
10 /* | 10 /* |
11 #include <sys/types.h> | 11 #include <sys/types.h> |
12 #include <sys/socket.h> | 12 #include <sys/socket.h> |
13 #include <netinet/in.h> | 13 #include <netinet/in.h> |
14 #include <netdb.h> | 14 #include <netdb.h> |
15 #include <stdlib.h> | 15 #include <stdlib.h> |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 func cgoLookupCNAME(name string) (cname string, err error, completed bool) { | 135 func cgoLookupCNAME(name string) (cname string, err error, completed bool) { |
136 _, cname, err, completed = cgoLookupIPCNAME(name) | 136 _, cname, err, completed = cgoLookupIPCNAME(name) |
137 return | 137 return |
138 } | 138 } |
139 | 139 |
140 func copyIP(x IP) IP { | 140 func copyIP(x IP) IP { |
141 y := make(IP, len(x)) | 141 y := make(IP, len(x)) |
142 copy(y, x) | 142 copy(y, x) |
143 return y | 143 return y |
144 } | 144 } |
LEFT | RIGHT |