]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: cut out non-standard functions
authorRuss Cox <rsc@golang.org>
Tue, 15 Oct 2013 18:25:29 +0000 (14:25 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 15 Oct 2013 18:25:29 +0000 (14:25 -0400)
Otherwise the link fails. Fixes build.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14483050

misc/cgo/test/issue6506.go

index 5c1d2a864bd54bd25ab9f8bcb7e259e5f0f72b3d..b79e242e9ccd6cffdf2f35b07e35c0b90cee5cbc 100644 (file)
@@ -10,18 +10,6 @@ package cgotest
 /*
 #include <stdlib.h>
 #include <string.h>
-
-// These functions are clang builtins but not standard on other systems.
-// Give them prototypes so that this test can be compiled on other systems.
-// One of the great things about this bug is that even with these prototypes
-// clang still generates the wrong debug information.
-
-void *alloca(size_t);
-void bzero(void*, size_t);
-int bcmp(const void*, const void*, size_t);
-int strncasecmp(const char*, const char*, size_t n);
-size_t strlcpy(char*, const char*, size_t);
-size_t strlcat(char*, const char*, size_t);
 */
 import "C"
 
@@ -44,10 +32,5 @@ func test6506() {
        x = C.strspn(nil, nil)
        C.memset(nil, 0, x)
        x = C.strlen(nil)
-       C.alloca(x)
-       C.bzero(nil, x)
-       C.strncasecmp(nil, nil, x)
-       x = C.strlcpy(nil, nil, x)
-       x = C.strlcat(nil, nil, x)
        _ = x
 }