blob: 597e750f128b326f2de08f4fa962a126cd5fe9e0 [file] [log] [blame]
Brad Fitzpatrick51947442016-03-01 22:57:46 +00001// Copyright 2014 The Go Authors. All rights reserved.
David Crawshaw72faffb2014-07-03 21:04:48 -04002// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Clément Chigot53d859b2019-02-20 16:05:23 +01005// +build aix !android,linux freebsd
David Crawshaw72faffb2014-07-03 21:04:48 -04006
7#include <stdarg.h>
8#include <stdio.h>
9#include <stdlib.h>
10#include "libcgo.h"
11
12void
13fatalf(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}