]> Cypherpunks repositories - gostls13.git/commit
runtime/cgo: make sure nil is undefined before defining it
authorElias Naur <elias.naur@gmail.com>
Wed, 7 Mar 2018 17:23:21 +0000 (18:23 +0100)
committerElias Naur <elias.naur@gmail.com>
Wed, 7 Mar 2018 21:08:19 +0000 (21:08 +0000)
commit7a2a96d6ad75762f427669beb0220810adb6a9e1
tree3d542fb136c66333791ccd6f4166c852c008cfb5
parent709da95513a64499c6974aadc563b9638fe9f49d
runtime/cgo: make sure nil is undefined before defining it

While working on standalone builds of gomobile bindings, I ran into
errors on the form:

gcc_darwin_arm.c:30:31: error: ambiguous expansion of macro 'nil' [-Werror,-Wambiguous-macro]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/usr/include/MacTypes.h:94:15: note: expanding this definition of 'nil'

Fix it by undefining nil before defining it in libcgo.h.

Change-Id: I8e9660a68c6c351e592684d03d529f0d182c0493
Reviewed-on: https://go-review.googlesource.com/99215
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/gcc_darwin_arm.c
src/runtime/cgo/gcc_darwin_arm64.c
src/runtime/cgo/libcgo.h