github.com/aloncn/graphics-go@v0.0.1/src/runtime/cgo/gcc_fatalf.c (about)

     1  // Copyright 2014 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build cgo
     6  
     7  // +build !android,linux
     8  
     9  #include <stdarg.h>
    10  #include <stdio.h>
    11  #include <stdlib.h>
    12  #include "libcgo.h"
    13  
    14  void
    15  fatalf(const char* format, ...)
    16  {
    17  	va_list ap;
    18  
    19  	fprintf(stderr, "runtime/cgo: ");
    20  	va_start(ap, format);
    21  	vfprintf(stderr, format, ap);
    22  	va_end(ap);
    23  	fprintf(stderr, "\n");
    24  	abort();
    25  }