Brad Fitzpatrick | 5194744 | 2016-03-01 22:57:46 +0000 | [diff] [blame] | 1 | // Copyright 2014 The Go Authors. All rights reserved. |
David Crawshaw | 72faffb | 2014-07-03 21:04:48 -0400 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Clément Chigot | 53d859b | 2019-02-20 16:05:23 +0100 | [diff] [blame] | 5 | // +build aix !android,linux freebsd |
David Crawshaw | 72faffb | 2014-07-03 21:04:48 -0400 | [diff] [blame] | 6 | |
| 7 | #include <stdarg.h> |
| 8 | #include <stdio.h> |
| 9 | #include <stdlib.h> |
| 10 | #include "libcgo.h" |
| 11 | |
| 12 | void |
| 13 | fatalf(const char* format, ...) |
| 14 | { |
| 15 | va_list ap; |
| 16 | |
| 17 | fprintf(stderr, "runtime/cgo: "); |
| 18 | va_start(ap, format); |
| 19 | vfprintf(stderr, format, ap); |
| 20 | va_end(ap); |
| 21 | fprintf(stderr, "\n"); |
| 22 | abort(); |
| 23 | } |